Ionic service proxy issue


#1

Hello.I’m trying to use service proxy in ionic v3 .I have added this to my config; (I try couple combinations for path and url but still not working)

{
“name”: “myappp”,
“app_id”: “”,
“type”: “ionic-angular”,
“proxies”: [
{ “path”: “*/api”,
“proxyUrl”: “http://cors.myapp.com/api” }],
“integrations”: {
“cordova”: {}
}
}

And then I have nancyfx json service running on iis7 ,and I have added this to my web.config;

< add name=“Access-Control-Allow-Origin” value=“http://cors.myapp.com/api”/>

But I still get this error ;

Response to preflight request doesn’t pass access control check: The ‘Access-Control-Allow-Origin’ header has a value ‘http://cors.myapp.com/api’ that is not equal to the supplied origin. Origin ‘http://localhost:8100’ is therefore not allowed access.

Any help is appreciated thanks.

Note: my web service is working if I add “ttp://localhost:8100” to directly “Access-Control-Allow-Origin”