CORS Issues

Hi, I’m trying to handle with CORS issues in livereload mode, but I wasn’t able to find a reasonable solution for that. My backend was developed in Java and it’s running on localhost.

ionic cordova emulate ios -l -c -s --address


  "name": "Smartmarket",
  "app_id": "",
  "type": "ionic-angular",
  "integrations": {
    "cordova": {}
  "proxies": [{
        "path": "/SmartmarketWeb/endpoint",
        "proxyUrl": ""

Request example:

let headers = new Headers({ 
	'Content-Type': 'application/json', 
	'Access-Control-Allow-Origin': '*',
	'Access-Control-Allow-Methods': 'GET, POST, OPTIONS',
	'Access-Control-Allow-Credentials': true,
	'Access-Control-Allow-Headers': 'origin, content-type, accept'
let options = new RequestOptions({ headers: headers });
return'', json, options)


Can anyone help me, please? I’ve tried to follow many solutions, however, none of them had an effect.

can you tell me which backend save processing did you use?

With your proxy configuration this has to look like this:

return'/SmartmarketWeb/login', json, options)

Because you replaced the remote with a local /SmartmarketWeb.

(I prefer naming the “path” of a proxy /api or something similar but different to the actual URI)

I’m using Jersey Rest over Java, but It’s not an issue on the backend. When I emulate without using livereload mode, it works properly.

I’ve tried to change the path to /SmartmarketWeb/endpoint, but it’s still not working =/

What URL is it now requesting in the network tab?

Thank you for your support, in order to solve this problem, It was necessary to handle the CORS on the server side.