stuff
This commit is contained in:
parent
ab2e20f7e1
commit
befaa207d7
23 changed files with 244 additions and 95 deletions
|
@ -14,6 +14,16 @@ builder.Services.UseBlogModule(databaseConnectionString);
|
|||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy(
|
||||
"DefaultCorsPolicy",
|
||||
b =>
|
||||
{
|
||||
b.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin();
|
||||
}
|
||||
);
|
||||
});
|
||||
builder
|
||||
.Services.AddControllers()
|
||||
.AddJsonOptions(options =>
|
||||
|
@ -27,6 +37,8 @@ builder
|
|||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseCors("DefaultCorsPolicy");
|
||||
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.MapOpenApi();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue