Mid From PDF ASP.NET Core ASP.NET Core

CORS for Web APIs?

Enable CORS (Cross-Origin Resource Sharing) to allow client apps from

different domains:

services.AddCors(options => {

options.AddPolicy("AllowFrontend", builder =>

builder.WithOrigins("

.AllowAnyHeader()

.AllowAnyMethod());

});

app.UseCors("AllowFrontend");

More from ASP.NET Core Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details