Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49250

Url with %20 in ionic.config.json proxies

$
0
0

@fme wrote:

I have the impression that "ionic serve --browser=chromium-browser" fails when the proxies JSON array in ionic.config.json contains a path and/or proxyUrl with values containing the character %20 (I suppose that represents a space?).

For example when the url in a $http POST is /en/XXX/XXX%20Home.aspx

I see in the chrome console this error:

XMLHttpRequest cannot load http://www.domain.be/en/XXX/XXX%20Home.aspx. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.

The $log.debug(response) displays this message:
verifyAuthentication FAILED!{"data":null,"status":-1,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"url":"/en/XXX/XXX%20Home.aspx","headers":{"Accept":"application/json, text/plain, /"},"withCredentials":true},"statusText":""}

Anyone experiencing something similar?

Or might this be due to wrong settings in meta http-equiv="Content-Security-Policy" settings?

PS
- I already tried to replace the %20 with the space character without result
- When I use firefox with the full URL (https://www.domain.be/en/XXX/XXX%20Home.aspx) and the CORS plugin active, I can get the result I want (so not passing through the proxy mechanism build inside ionic serve). So I know its working in certain cases between server and simulation in the web browser.
- Unfortunately I don't control the web site and cannot change the URL.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49250

Trending Articles