Update the CORS settings to use the "appsetings.ENV.json"

This commit is contained in:
Sébastien André
2019-11-11 21:38:00 +01:00
parent 4cc7ee9a9e
commit ce7d36bb21

View File

@@ -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";
}
}