Files
ASP.NET/content/02-Project-Based/Session05/Session05 Backend.md
T
2025-07-18 14:47:22 +03:30

470 B

🛠️ Task Checklist

CORS (Backend Repository)

  • open program.cs and add the following lines
builder.Services.AddCors(options =>
{
    options.AddPolicy("Frontend", policy =>
    {
        policy.WithOrigins("http://localhost:5173")
        .AllowAnyHeader()
        .AllowAnyMethod();
    });
});

...

app.UseCors("Frontend");

🧠 Hints & Notes

🙌 Acknowledgements

  • ChatGPT for snippet refinement and explanations

🔍 References