Update the CORS settings to use the "appsetings.ENV.json"
This commit is contained in:
@@ -28,7 +28,7 @@ namespace skydiveLogs_api
|
||||
options.AddDefaultPolicy(
|
||||
builder =>
|
||||
{
|
||||
builder.WithOrigins("http://localhost:4200")
|
||||
builder.WithOrigins(Configuration.GetSection("AllowedHosts").Value)
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod();
|
||||
});
|
||||
@@ -61,7 +61,5 @@ namespace skydiveLogs_api
|
||||
}
|
||||
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
readonly string MyAllowSpecificOrigins = "_allowSpecificOrigins";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user