Access to XMLHttpRequest at 'http://192.168.1.30/v1w/?tag=login' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
Asked
Active
Viewed 4,032 times
1 Answers
0
Here are possible solutions
You need to add CORS headers at your PHP end. Solution is provided in another question CORS with php headers
If you do not want to add CORS, which I recommend when for your production environment, you can setup a reverse proxy using nginx or httpd such that both your http-request and html files are served from same url base
You can also temporarily disable CORS check on browser. Answered here: Does --disable-web-security work in Chrome anymore?
You can also use chrome extension or firefox extension which can disable CORS check for certain domains. Example https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en-US

Jp Vinjamoori
- 1,173
- 5
- 16