Némi API hozzáadás
This commit is contained in:
@@ -74,7 +74,13 @@ builder.Services.AddControllers()
|
||||
options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
|
||||
});
|
||||
|
||||
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddDefaultPolicy(policy =>
|
||||
{
|
||||
policy.WithOrigins("*").AllowAnyMethod().AllowAnyHeader();
|
||||
});
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
@@ -95,11 +101,11 @@ if (app.Environment.IsDevelopment())
|
||||
}
|
||||
|
||||
// Routing és endpointok
|
||||
app.UseHttpsRedirection();
|
||||
//app.UseHttpsRedirection();
|
||||
app.UseRouting();
|
||||
app.UseMiddleware<ApiKeyMiddleware>();
|
||||
app.MapControllers();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseCors();
|
||||
app.Run();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user