Ionic3(Angular4) CORS on an emulator

后端 未结 1 455
别跟我提以往
别跟我提以往 2021-01-23 02:43

I\'m testing Ionic 3 app on a genymotion emulator. Btw http request doesn\'t work because of CORS. I thought that a sever has a problem. But I confirmed that a server has no pro

1条回答
  •  萌比男神i
    2021-01-23 03:19

    under your config.xml give the location of your localhost

    eg:

    
    
    
    

    further more make sure you add the proxy url under ionic.config.json

    "proxies": [{
            "path": "/rest",
            "proxyUrl": "http://10.10.10.1:8081/rest"
        }]
    

    0 讨论(0)
提交回复
热议问题