Skip to content

Instantly share code, notes, and snippets.

@Schepp
Last active December 21, 2015 17:09
Show Gist options
  • Save Schepp/6338742 to your computer and use it in GitHub Desktop.
Save Schepp/6338742 to your computer and use it in GitHub Desktop.
Send CORS headers for CSS files only

Put this into the server's .htaccess file (assuming that it's an Apache):

<IfModule mod_headers.c>
  <FilesMatch "\.css$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment