Created
April 20, 2016 05:28
-
-
Save ncole458/a11ebb9b85a556923e06271bc3834c21 to your computer and use it in GitHub Desktop.
CORS for Django /media (FireFox fix)
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
| # Your Django project's media files - amend as required | |
| location /media { | |
| if ($request_filename ~* ^.*?/([^/]*?)$) { | |
| set $filename $1; | |
| } | |
| if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){ | |
| add_header Access-Control-Allow-Origin *; | |
| } | |
| alias /django/django_project/media; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment