This commit is contained in:
kuaifan
2025-07-18 13:59:48 +08:00
parent 9633f7644e
commit 3da90337ef
76 changed files with 391 additions and 392 deletions
+5 -18
View File
@@ -35,24 +35,11 @@ server {
add_header Access-Control-Expose-Headers "Date, Last-Modified, Age" always;
location / {
try_files $uri @laravels;
}
location ~* \.(jpe?g|png|gif|webp|svg|ico|bmp)$ {
add_header Access-Control-Allow-Origin "http://localhost:2222" always;
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
add_header Access-Control-Allow-Credentials "true" always;
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin "http://localhost:2222";
add_header Access-Control-Allow-Methods "GET, OPTIONS";
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization";
add_header Access-Control-Allow-Credentials "true";
add_header Access-Control-Max-Age 1728000;
add_header Content-Type "text/plain; charset=utf-8";
add_header Content-Length 0;
return 204;
if ($uri ~* \.(jpe?g|png|gif|webp|svg|ico|bmp)$) {
add_header Access-Control-Allow-Origin "http://localhost:2222" always;
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
add_header Access-Control-Allow-Credentials "true" always;
}
try_files $uri @laravels;