Show full QR codes with copy button in GroupDetailPage
This commit is contained in:
@@ -19,6 +19,17 @@ builder.Services.AddScoped<IProductService, ProductService>();
|
||||
builder.Services.AddScoped<IQrCodeService, QrCodeService>();
|
||||
builder.Services.AddScoped<ITransactionService, TransactionService>();
|
||||
|
||||
// Add CORS
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("AllowFrontend", policy =>
|
||||
{
|
||||
policy.WithOrigins("http://localhost:5173")
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
@@ -39,6 +50,8 @@ if (app.Environment.IsDevelopment())
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseCors("AllowFrontend");
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
Reference in New Issue
Block a user