I’m dealing with CORS issues when developing while trying to reach an API endpoint. I’ve set-up a proxy via the ionic.properties so the CLI can handle the requests.
The main problem here is, the API I’m trying to access cannot respond correctly to a trailing slash that’s being added by the CLI.
While my proxy config says “http://domain.com/api.asmx/method”, the request is being done as “http://domain.com/api.asmx/method/” (note the trailing slash) and the endpoint responds as “method/” not found (note again the trailing slash).
Any thoughts? This looks like a bug to me.
Anything about this, Mike? @mhartington
Same issue here is well. Testing with Ionic2 CLI, and getting the trailing slash when added to ionic.config.js in the proxy array. Trying to fetch a resource from Google Places API over http.
Does anyone have a workaround for this ?
I use a CORS plugin in chrome
Hello, I’m dealing with the same issue. The chrome plugin is more like a workaround. Did someone find a solution ?
My workaround was to put only the base path as the proxy leaving the rest of the base path to the actual request:
then in the app