summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElizabeth Hunt <me@liz.coffee>2026-01-04 21:15:44 -0800
committerElizabeth Hunt <me@liz.coffee>2026-01-04 21:15:44 -0800
commit681a8af8b192387ada5045ad0d7db53b1ec131b6 (patch)
tree5dfac56c69b17001e5fcb92898d64d9261118a3b
parentacfea7c9e0129168205c374783e7036e5018c9a5 (diff)
downloadadelie-681a8af8b192387ada5045ad0d7db53b1ec131b6.tar.gz
adelie-681a8af8b192387ada5045ad0d7db53b1ec131b6.zip
Fix CORS
-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;
}
}