I've a mixed situation:
- Ubuntu server 18.04
- Apache 2.4.29
- Mono and mod_mono enabled
A mixed situation about pages: - php pages - ASMX .NET web service
Finally, a WebGL application on a CDN.
So, user get my WebGL app on cdn.mywebsite.com . WebGL app must communicate with my asmx .net webservice.
But i'm getting the classic error:
..has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
I've added: - In .htacces file
<IfModule mod_headers.c>
Header add Access-Control-Allow-Origin "*"
</IfModule>
But also in web.config file (because there's my web service also running):
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS"/>
<add name="Access-Control-Allow-Headers" value="Content-Type"/>
</customHeaders>
</httpProtocol>
</system.webServer>
I've also enabled headers apache mod.
What can be the reason CORS is not working ?