0

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.

khushali
  • 88
  • 1
  • 7

1 Answers1

0

Here are possible solutions

  1. You need to add CORS headers at your PHP end. Solution is provided in another question CORS with php headers

  2. 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

  3. You can also temporarily disable CORS check on browser. Answered here: Does --disable-web-security work in Chrome anymore?

  4. 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