The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*'


#1

The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. Origin ‘http://localhost:8100’ is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute


#2

Hey dude , you can download this https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi extension. And enable cross origin share. This problem is solved.


#3

thanks @halilarici , but it’s not working still gives the same error .
i am using ionic v1


#4

wow , really interesting. If you use the php web service , you can try this

<?php header("Access-Control-Allow-Origin: *"); ?>

#5

I am not using php service , i’m using angular $http request for fetching the json form REST API.


#6

I understand you. Rest api no PHP ? Allow control origin * problem is solved.


#7

I already tried 'Allow control origin' : '*' and 'mode' : 'no-cors' still not working


#8

Okay dude. You can try

npm install -g corsproxy

and open new command terminal

write the
corsproxy

and solved.

Url is first start example: http://localhost:1337/http://restapi