cors funcionaras o no
This commit is contained in:
parent
8f0fff3953
commit
341b0b3841
|
|
@ -272,14 +272,14 @@ app.UseSwaggerUI(options =>
|
||||||
options.SwaggerEndpoint("/swagger/v1/swagger.json", "DoliMiddlewareApi v1");
|
options.SwaggerEndpoint("/swagger/v1/swagger.json", "DoliMiddlewareApi v1");
|
||||||
});
|
});
|
||||||
|
|
||||||
// No HTTPS redirect in Docker (behind reverse proxy)
|
// HTTPS redirect solo si ForceHttps=true (nunca en Docker)
|
||||||
if (!bool.TryParse(builder.Configuration["Dolibarr:ForceHttps"], out var forceHttps) || !forceHttps)
|
if (bool.TryParse(builder.Configuration["Dolibarr:ForceHttps"], out var forceHttps) && forceHttps)
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
|
|
||||||
app.UseRateLimiter();
|
|
||||||
|
|
||||||
app.UseCors("AllowVueApp");
|
app.UseCors("AllowVueApp");
|
||||||
|
|
||||||
|
app.UseRateLimiter();
|
||||||
|
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue