Dear Friends,
I try to access a local web service in my company network to work on . But it shows error as
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://172.16.8.70/web/sanchayarestservice/index.php/LGIWebServices/sanchaya. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)
I added a proxy in my test application on ionic.config.json as
{
"name": "dreamhouse-ionic3",
"app_id": "",
"integrations": {
"cordova": {}
},
"proxies": [
{
"path": "/web",
"proxyUrl": "http://172.16.8.70/web/sanchayarestservice/index.php/sanchaya/ward/id/"
}
],
"type": "ionic-angular"
}
Now i can take the URL : http://localhost:8100/web
and it gives json data .
But in my app shows the same error.
How it can rectify ? please advise
Thanks
Anes