Commit 40d583b4 by John Jarvis

Merge pull request #703 from edx/jarv/fix-fonts

fixing the font location stanza
parents 226071f6 35f96dac
...@@ -38,10 +38,6 @@ server { ...@@ -38,10 +38,6 @@ server {
rewrite ^(.*)/favicon.ico$ /static/images/favicon.ico last; rewrite ^(.*)/favicon.ico$ /static/images/favicon.ico last;
# http://www.red-team-design.com/firefox-doesnt-allow-cross-domain-fonts-by-default
location ~* \.(eot|otf|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}
location @proxy_to_cms_app { location @proxy_to_cms_app {
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
...@@ -78,6 +74,14 @@ server { ...@@ -78,6 +74,14 @@ server {
location ~ ^/static/(?:.*)(?:\.xml|\.json|README.TXT) { location ~ ^/static/(?:.*)(?:\.xml|\.json|README.TXT) {
return 403; return 403;
} }
# http://www.red-team-design.com/firefox-doesnt-allow-cross-domain-fonts-by-default
location ~ "/static/(?P<collected>.*\.[0-9a-f]{12}\.(eot|otf|ttf|woff))" {
expires max;
add_header Access-Control-Allow-Origin *;
try_files /staticfiles/$collected /course_static/$collected =404;
}
# Set django-pipelined files to maximum cache time # Set django-pipelined files to maximum cache time
location ~ "/static/(?P<collected>.*\.[0-9a-f]{12}\..*)" { location ~ "/static/(?P<collected>.*\.[0-9a-f]{12}\..*)" {
expires max; expires max;
......
...@@ -35,11 +35,6 @@ server { ...@@ -35,11 +35,6 @@ server {
rewrite ^(.*)/favicon.ico$ /static/images/favicon.ico last; rewrite ^(.*)/favicon.ico$ /static/images/favicon.ico last;
# http://www.red-team-design.com/firefox-doesnt-allow-cross-domain-fonts-by-default
location ~* \.(eot|otf|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}
location @proxy_to_lms_app { location @proxy_to_lms_app {
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port; proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
...@@ -75,6 +70,14 @@ server { ...@@ -75,6 +70,14 @@ server {
location ~ ^/static/(?:.*)(?:\.xml|\.json|README.TXT) { location ~ ^/static/(?:.*)(?:\.xml|\.json|README.TXT) {
return 403; return 403;
} }
# http://www.red-team-design.com/firefox-doesnt-allow-cross-domain-fonts-by-default
location ~ "/static/(?P<collected>.*\.[0-9a-f]{12}\.(eot|otf|ttf|woff))" {
expires max;
add_header Access-Control-Allow-Origin *;
try_files /staticfiles/$collected /course_static/$collected =404;
}
# Set django-pipelined files to maximum cache time # Set django-pipelined files to maximum cache time
location ~ "/static/(?P<collected>.*\.[0-9a-f]{12}\..*)" { location ~ "/static/(?P<collected>.*\.[0-9a-f]{12}\..*)" {
expires max; expires max;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment