Skip to content

Commit 75fbacd

Browse files
authored
nginx: add CORS for /storage (#19)
1 parent bd400b7 commit 75fbacd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

nginx/templates/default.conf.template

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ server {
3131
if ($request_filename ~* ^.*?\.(txt|zip)$){
3232
add_header Content-Disposition "attachment;";
3333
}
34+
35+
# Uncomment the following lines to allow CORS
36+
# add_header 'Access-Control-Allow-Origin' '*';
37+
# add_header 'Access-Control-Allow-Credentials' 'true';
38+
# add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
39+
# add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
40+
# add_header 'Access-Control-Max-Age' 3600;
41+
3442
alias /storage;
3543
}
3644

0 commit comments

Comments
 (0)