https://anna.info/x/wiki/w/index.php?title=Access-Control-Allow-Origin&feed=atom&action=historyAccess-Control-Allow-Origin - Revision history2024-03-29T10:47:18ZRevision history for this page on the wikiMediaWiki 1.39.1https://anna.info/x/wiki/w/index.php?title=Access-Control-Allow-Origin&diff=5654&oldid=prevTobiasco: Created page with " https://www.w3.org/TR/cors/#access-control-allow-origin-response-header In practice the origin-list-or-null production is more constrained. Rather than allowing a space-se..."2018-08-23T17:58:32Z<p>Created page with " https://www.w3.org/TR/cors/#access-control-allow-origin-response-header In practice the origin-list-or-null production is more constrained. Rather than allowing a space-se..."</p>
<p><b>New page</b></p><div> https://www.w3.org/TR/cors/#access-control-allow-origin-response-header<br />
In practice the origin-list-or-null production is more constrained. <br />
Rather than allowing a space-separated list of origins, it is either a single origin or the string "null".<br />
<br />
==multiple values==<br />
* seperator in Apache can be comma - no space after comma!<br />
* multiple values rejected by Chrome<br />
<br />
Store list in Apache and only return the matched one<br />
https://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains<br />
<br />
# ----------------------------------------------------------------------<br />
# Allow loading of external fonts<br />
# ----------------------------------------------------------------------<br />
<FilesMatch "\.(ttf|otf|eot|woff)$"><br />
<IfModule mod_headers.c><br />
SetEnvIf Origin "http(s)?://(www\.)?(google.com|staging.google.com|development.google.com|otherdomain.example|dev02.otherdomain.example)$" AccessControlAllowOrigin=$0<br />
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin<br />
Header merge Vary Origin<br />
</IfModule><br />
</FilesMatch></div>Tobiasco