config: Allow all origins in CORS policy and disable HTTPS redirection.
Build & Push Hospitality / build-and-push (push) Failing after 2m4s
Build & Push Hospitality / build-and-push (push) Failing after 2m4s
This commit is contained in:
@@ -65,16 +65,9 @@ builder.Services.AddScoped<ITransactionService, TransactionService>();
|
||||
// Add CORS
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("AllowFrontend", policy =>
|
||||
{
|
||||
policy.WithOrigins(
|
||||
"http://localhost:5173",
|
||||
"https://hospitality-dev.theriise.net",
|
||||
"https://hospitality.theriise.net"
|
||||
)
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod();
|
||||
});
|
||||
policy.SetIsOriginAllowed(origin => true) // Allow any origin
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod();
|
||||
});
|
||||
|
||||
|
||||
@@ -101,7 +94,7 @@ if (app.Environment.IsDevelopment())
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
// app.UseHttpsRedirection(); // Disabled because Traefik handles SSL
|
||||
|
||||
app.UseCors("AllowFrontend");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user