rest – I get CORS error in Sharepoint but i also changed web-config. Nothing happens?


I call ajax request and the browser got CORS error. I tried to add "Access-Control-Allow-Origin" in IIS, webconfig. But it doesn’t work. I have two servers. My ajax is true only i have this issue. So how can i do that?

<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" />
<add name="Access-Control-Allow-Credentials" value="true" />