.NET Web in Azure App Service not working Cors
Petr Kasnal
26
Reputation points
Hey. Hey,
I'm creating an api in .NET and I have set up cors using the following code.
builder.Services.AddCors(options =>
{
options.AddPolicy("Test", policy =>
{
policy.WithOrigins("https://dataintegrationswagger.blob.core.windows.net/");
policy.WithOrigins("https://deepappfrontend.z6.web.core.windows.net/");
});
});
app.UseCors("Test");
But when I upload the app to App Service, the cors setting from the app does not work. When I set it directly in Azure, it works, but I don't want that at all.
What to do?
Thanks
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,933 questions
Developer technologies .NET Other
4,103 questions
Sign in to answer