refactor: enclose CORS policy configuration in a block statement
Build & Push Hospitality / build-and-push (push) Successful in 3m13s
Build & Push Hospitality / build-and-push (push) Successful in 3m13s
This commit is contained in:
@@ -64,12 +64,14 @@ builder.Services.AddScoped<ITransactionService, TransactionService>();
|
||||
|
||||
// Add CORS
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("AllowFrontend", policy =>
|
||||
{
|
||||
policy.SetIsOriginAllowed(origin => true) // Allow any origin
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
Reference in New Issue
Block a user