Compare commits

...

3 Commits

Author SHA1 Message Date
steinhelge c3750239c7 feat: configure Traefik load balancer for hospitality-dev-api to use port 8080
Build & Push Hospitality / build-and-push (push) Failing after 3m8s
2025-11-26 12:33:18 +01:00
steinhelge d1568c788a config: Allow all origins in CORS policy and disable HTTPS redirection.
Build & Push Hospitality / build-and-push (push) Failing after 2m4s
2025-11-26 12:07:31 +01:00
steinhelge dcc8e10bd2 config: Expand CORS policy to include development and production frontend URLs.
Build & Push Hospitality / build-and-push (push) Successful in 3m5s
2025-11-26 11:48:38 +01:00
2 changed files with 3 additions and 5 deletions
+2 -5
View File
@@ -65,13 +65,10 @@ builder.Services.AddScoped<ITransactionService, TransactionService>();
// Add CORS
builder.Services.AddCors(options =>
{
options.AddPolicy("AllowFrontend", policy =>
{
policy.WithOrigins("http://localhost:5173")
policy.SetIsOriginAllowed(origin => true) // Allow any origin
.AllowAnyHeader()
.AllowAnyMethod();
});
});
var app = builder.Build();
@@ -97,7 +94,7 @@ if (app.Environment.IsDevelopment())
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
// app.UseHttpsRedirection(); // Disabled because Traefik handles SSL
app.UseCors("AllowFrontend");
@@ -39,6 +39,7 @@ services:
- "traefik.http.routers.hospitality-dev-api.rule=Host(`hospitality-dev-api.theriise.net`)"
- "traefik.http.routers.hospitality-dev-api.entrypoints=websecure"
- "traefik.http.routers.hospitality-dev-api.tls=true"
- "traefik.http.services.hospitality-dev-api.loadbalancer.server.port=8080"
web:
image: gitea.theriise.net/steinhelge/hospitality-frontend:dev