febox
June 17, 2021, 4:12pm
1
Product: Universal Dashboard
Version: 2.9.0
Hi,
Is it possible to enable CORS for my UD version?
I’ve been trying to configure IIS to enable CORS but I’m having multiple issues with it. I’m wondering if this is achievable by setting it up in IIS or if there’s something else in the dashboard that needs to be set.
Thanks
adam
June 18, 2021, 1:07pm
2
CORS is enabled by UD by default.
app.UseStaticFiles(new StaticFileOptions
{
RequestPath = publishedFolder.RequestPath,
FileProvider = new PhysicalFileProvider(publishedFolder.Path),
ServeUnknownFileTypes = true,
ContentTypeProvider = provider
});
}
}
app.UseCors(builder => builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader().AllowCredentials());
app.UseSignalR(routes =>
{
routes.MapHub<DashboardHub>("/dashboardhub");
});
app.UseWebSockets();
app.UseSession();
app.UseMvc();
What issues are you having in IIS?
febox
June 22, 2021, 4:16pm
3
Thank you very much for your answer.
Indeed CORS was enabled, I got confused with a different CORS error (duplicated header)
1 Like