Added docker-compose. Updated startups for API and Web layer.
This commit is contained in:
@@ -15,12 +15,18 @@ public static class WebApplicationExtensions
|
||||
{
|
||||
public static WebApplication UseAppPipeline(this WebApplication app, IHostEnvironment env)
|
||||
{
|
||||
app.UseCors("ui");
|
||||
string[] origins = app.Configuration.GetSection("Cors:AllowedOrigins").Get<string[]>() ?? [];
|
||||
|
||||
if (origins.Length > 0)
|
||||
app.UseCors("ui");
|
||||
|
||||
if (env.IsDevelopment())
|
||||
app.MapOpenApi();
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
if (!env.IsDevelopment())
|
||||
{
|
||||
app.UseHttpsRedirection();
|
||||
}
|
||||
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
Reference in New Issue
Block a user