Is there a way to allow multiple cross-domains using the Access-Control-Allow-Origin
header?
I\'m aware of the *
, but it is too open. I rea
HTTP_ORIGIN is not used by all browsers. How secure is HTTP_ORIGIN? For me it comes up empty in FF.
I have the sites that I allow access to my site send over a site ID, I then check my DB for the record with that id and get the SITE_URL column value (www.yoursite.com).
header('Access-Control-Allow-Origin: http://'.$row['SITE_URL']);
Even if the send over a valid site ID the request needs to be from the domain listed in my DB associated with that site ID.