0

I am getting the following error in javascript with chrome.

Access to XMLHttpRequest at 'http://stream.example.com/' from origin 'http://test.example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

http://stream.example.com/ has the following headers

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: *

Both http://stream.example.com/ and http://test.example.com are aliases to localhost since i am currently developing the app.

What is wrong here ?

Thanks for the help

2
  • Answered here stackoverflow.com/a/56467419/6514992 Commented Jan 11, 2020 at 20:49
  • @FouèdMoussi if you check my post i already added those headers Commented Jan 12, 2020 at 7:55

1 Answer 1

1

I recommand you using barryvdh laravel-cors package

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.