Created
January 14, 2022 14:20
-
-
Save atanasantonov/d96fa75b246eec73ed36525c6993ff6e to your computer and use it in GitHub Desktop.
Cross domain resourses loading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_headers.c> | |
<FilesMatch "\.(jpg|png)$"> | |
Header set Access-Control-Allow-Credentials true | |
SetEnvIf Origin "http(s)?://(www\.)?(example.com|anotherexample.com)$" AccessControlAllowOrigin=$0 | |
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin | |
Header merge Vary Origin | |
</FilesMatch> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment