Maybe cors? I dont know
This commit is contained in:
@ -122,6 +122,16 @@ namespace IO.Swagger
|
||||
});
|
||||
});
|
||||
|
||||
services.AddCors(opt => {
|
||||
opt.AddDefaultPolicy(po =>
|
||||
{
|
||||
po.AllowAnyHeader()
|
||||
.WithMethods("GET", "POST")
|
||||
.WithOrigins("http://localhost:*", "https://localhost:*", "http://*.shrukanslab.xyz", "https://*.shrukanslab.xyz")
|
||||
.SetIsOriginAllowedToAllowWildcardSubdomains();
|
||||
});
|
||||
});
|
||||
|
||||
string connectionString = Environment.GetEnvironmentVariable("DATABASE_CONNECTION_STRING");
|
||||
|
||||
if (string.IsNullOrEmpty(connectionString))
|
||||
@ -146,8 +156,7 @@ namespace IO.Swagger
|
||||
context.Database.Migrate();
|
||||
app.UseRouting();
|
||||
|
||||
//TODO: Uncomment this if you need wwwroot folder
|
||||
// app.UseStaticFiles();
|
||||
app.UseCors();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user