refactor: name CORS policy 'AllowFrontend'
Build & Push Hospitality / build-and-push (push) Failing after 2m57s
Build & Push Hospitality / build-and-push (push) Failing after 2m57s
This commit is contained in:
@@ -64,11 +64,12 @@ 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