Sometime we have to request files from different host using ajax, and it may create problem because of CORS polices.
CORS means Cross-Origin Resource Sharing (CORS).
Cross domain request will be block by most of the browsers due to same-origin security policy. so we have to enable CORS on our server.we can do this by setting
Access-Control-Allow-Origin in a PHP with changing server.
if we need to allow a request from a perticular domain we can restrict as below
or we can allow from all sites
6,864 total views, 3 views today