Compare commits
3 Commits
master
..
c3750239c7
| Author | SHA1 | Date | |
|---|---|---|---|
| c3750239c7 | |||
| d1568c788a | |||
| dcc8e10bd2 |
@@ -65,12 +65,9 @@ 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();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user