Skip to content

Commit 710fadf

Browse files
Add CORS headers for static assets in nginx config
1 parent 3a2d1a2 commit 710fadf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

operations/cookbook.service

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ After=network.target
66
Type=simple
77
User=quinn
88
WorkingDirectory=/home/quinn/cookbook/book
9-
Environment="HOST=recipes.for-all.dev"
10-
Environment="BASE_URL=https://recipes.for-all.dev"
119
ExecStart=/home/quinn/.local/bin/uv run jupyter book start --port 3000
1210
Restart=always
1311
RestartSec=10

operations/nginx-cookbook.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ server {
77
try_files $uri @proxy;
88
expires 1y;
99
add_header Cache-Control "public, immutable";
10+
add_header Access-Control-Allow-Origin "*";
11+
add_header Access-Control-Allow-Methods "GET, OPTIONS";
12+
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range";
1013
}
1114

1215
location @proxy {

0 commit comments

Comments
 (0)