I have two web pages hosted on a.example.com and b.example . Each web page contains a script with a <script> tag hosted in a different domain and served with the correct CORS headers.
At some point, the user moves from a.example.com to b.example.com .
Safari has a weird behavior: the referrer and origin headers in the pre-sale request are populated with a.example.com , which makes the server send a bad value to Access-Control-Allow-Origin (and therefore the script cannot be executed).
Is there a way to get the Safari browser to send the correct origin header in this scenario?
source share