vault backup: 2025-06-23 00:01:29
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# CORS (Backend Repository)
|
||||
- [ ] open `program.cs` and add the following lines
|
||||
|
||||
```c#
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("Frontend", policy =>
|
||||
{
|
||||
policy.WithOrigins("http://localhost:5173")
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod();
|
||||
});
|
||||
});
|
||||
|
||||
...
|
||||
|
||||
app.UseCors("Frontend");
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user