summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nginx.conf11
1 files changed, 11 insertions, 0 deletions
diff --git a/nginx.conf b/nginx.conf
index 70946b7..7b9479a 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -52,22 +52,33 @@ http {
location ~* \.(css|js)$ {
expires 30m;
add_header Cache-Control "public, max-age=1800" always;
+ add_header Access-Control-Allow-Origin "*" always;
+ add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
+ add_header Access-Control-Allow-Headers "Content-Type" always;
}
location ~* \.(woff|woff2|ttf|otf|eot)$ {
expires 30m;
add_header Cache-Control "public, max-age=1800" always;
add_header Access-Control-Allow-Origin "*" always;
+ add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
+ add_header Access-Control-Allow-Headers "Content-Type" always;
}
location ~* \.(jpg|jpeg|png|gif|svg|ico|webp)$ {
expires 30m;
add_header Cache-Control "public, max-age=1800" always;
+ add_header Access-Control-Allow-Origin "*" always;
+ add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
+ add_header Access-Control-Allow-Headers "Content-Type" always;
}
location / {
expires 30m;
add_header Cache-Control "public, max-age=1800" always;
+ add_header Access-Control-Allow-Origin "*" always;
+ add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
+ add_header Access-Control-Allow-Headers "Content-Type" always;
try_files $uri $uri/ =404;
}
}