Allow CORS for any origin whilst in development
This commit is contained in:
parent
0fd2523629
commit
70aa790c16
@ -14,6 +14,8 @@ builder.Services.AddSwaggerGen();
|
||||
// App services
|
||||
builder.Services.AddServiceDependencies();
|
||||
|
||||
builder.Services.AddCors();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
@ -28,6 +30,9 @@ if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
|
||||
app.UseCors(options =>
|
||||
options.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
Loading…
Reference in New Issue
Block a user