feat(api): CORS settings
This commit is contained in:
@@ -56,6 +56,8 @@ builder.Services.AddEndpointsApiExplorer();
|
|||||||
builder.Services.AddSwaggerGen();
|
builder.Services.AddSwaggerGen();
|
||||||
builder.Services.InstallSwaggerService(builder.Configuration);
|
builder.Services.InstallSwaggerService(builder.Configuration);
|
||||||
|
|
||||||
|
builder.Services.InstallCorsServices();
|
||||||
|
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
@@ -70,4 +72,6 @@ app.UseAuthorization();
|
|||||||
|
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
|
|
||||||
|
app.InstallCors(builder);
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"CorsSettings": {
|
"CorsSettings": {
|
||||||
"AllowedHosts": "*"
|
"AllowedHosts": "http://localhost:4200; http://10.99.253.221:8083"
|
||||||
},
|
},
|
||||||
"StorageSettings": {
|
"StorageSettings": {
|
||||||
"StoragePath": "Data",
|
"StoragePath": "Data",
|
||||||
|
|||||||
Reference in New Issue
Block a user