Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. # ----------------------------------------------------------------------
  2. # CORS-enabled images (@crossorigin)
  3. # ----------------------------------------------------------------------
  4. # Send CORS headers if browsers request them; enabled by default for images.
  5. # developer.mozilla.org/en/CORS_Enabled_Image
  6. # blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
  7. # hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
  8. # wiki.mozilla.org/Security/Reviews/crossoriginAttribute
  9. <IfModule mod_setenvif.c>
  10. <IfModule mod_headers.c>
  11. # mod_headers, y u no match by Content-Type?!
  12. <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$">
  13. SetEnvIf Origin ":" IS_CORS
  14. Header set Access-Control-Allow-Origin "*" env=IS_CORS
  15. </FilesMatch>
  16. </IfModule>
  17. </IfModule>
  18. # ----------------------------------------------------------------------
  19. # Webfont access
  20. # ----------------------------------------------------------------------
  21. # Allow access from all domains for webfonts.
  22. # Alternatively you could only whitelist your
  23. # subdomains like "subdomain.example.com".
  24. <IfModule mod_headers.c>
  25. <FilesMatch "\.(ttf|ttf?8|ttc|otf|eot|eot?8|woff|woff?8|woff2|font.css|css|js)$">
  26. Header set Access-Control-Allow-Origin "*"
  27. </FilesMatch>
  28. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement