Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

Problem with Cross origin blocked in local system. How it solve?

$
0
0

@anespa wrote:

Dear Friends,

I try to access a local web service in my company network to work on . But it shows error as

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://172.16.8.70/web/sanchayarestservice/index.php/LGIWebServices/sanchaya. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)

I added a proxy in my test application on ionic.config.json as

{
  "name": "dreamhouse-ionic3",
  "app_id": "",
  "integrations": {
    "cordova": {}
  },
  "proxies": [
    {
      "path": "/web",
      "proxyUrl": "http://172.16.8.70/web/sanchayarestservice/index.php/sanchaya/ward/id/"
    }
  ],
  "type": "ionic-angular"
}

Now i can take the URL : http://localhost:8100/web
and it gives json data .

But in my app shows the same error.

How it can rectify ? please advise

Thanks

Anes

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>