Skip to content

Commit 75a6f8c

Browse files
committed
배포 cors 설정
1 parent ea88de9 commit 75a6f8c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,22 @@ jobs:
4747
proxy_set_header Connection 'upgrade';
4848
proxy_set_header Host $host;
4949
proxy_cache_bypass $http_upgrade;
50+
51+
add_header 'Access-Control-Allow-Origin' 'https://loa-life.vercel.app' always;
52+
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
53+
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization' always;
54+
add_header 'Access-Control-Allow-Credentials' 'true' always;
55+
56+
if ($request_method = 'OPTIONS') {
57+
add_header 'Access-Control-Allow-Origin' 'https://loa-life.vercel.app' always;
58+
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
59+
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization' always;
60+
add_header 'Access-Control-Allow-Credentials' 'true' always;
61+
add_header 'Access-Control-Max-Age' 1728000;
62+
add_header 'Content-Type' 'text/plain; charset=utf-8';
63+
add_header 'Content-Length' 0;
64+
return 204;
65+
}
5066
}
5167
}
5268
EOF

0 commit comments

Comments
 (0)