Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- services.AddCors(
- options => options.AddPolicy(
- "CorsPolicy",
- builder =>
- {
- builder.AllowAnyMethod()
- .AllowAnyHeader()
- .WithOrigins(
- Configuration
- .GetSection(
- "Cors:Hosts"
- ).GetChildren(
- ).AsEnumerable(
- ).Select(
- a => a.Value
- ).ToArray()
- )
- .AllowCredentials();
- }
- )
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement