From c8b121fb16f8053ed5e57a5345bafc5d0267019e Mon Sep 17 00:00:00 2001 From: root Date: Thu, 25 Sep 2025 06:58:10 +0000 Subject: [PATCH] new conf --- docker-compose.yml | 1 + nginx.conf | 6 +++--- start.sh | 0 3 files changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 start.sh diff --git a/docker-compose.yml b/docker-compose.yml index dde7ece..aebede2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,6 +77,7 @@ services: - -hooks-http=http://backend-app:${SANIC_PORT:-8080}/api/v1/upload.tus-hook - -hooks-http-forward-headers=Authorization,X-Upload-Metadata - -behind-proxy + - -disable-cors environment: - TUSD_LOG_LEVEL=info volumes: diff --git a/nginx.conf b/nginx.conf index d5f461f..3feee4a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -66,8 +66,8 @@ server { # CORS (для API и префлайтов) add_header Access-Control-Allow-Origin * always; - add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always; - add_header Access-Control-Allow-Headers "Origin, Content-Type, Accept, Authorization, Referer, User-Agent, Sec-Fetch-Dest, Sec-Fetch-Mode, Sec-Fetch-Site, x-file-name, x-last-chunk, x-chunk-start, x-upload-id, x-request-id" always; + add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, PATCH, HEAD" always; + add_header Access-Control-Allow-Headers "Origin, Cache-Control, Content-Type, Accept, Authorization, Referer, User-Agent, Sec-Fetch-Dest, Sec-Fetch-Mode, Sec-Fetch-Site, Tus-Resumable, tus-resumable, Upload-Length, upload-length, Upload-Offset, upload-offset, Upload-Metadata, upload-metadata, Upload-Defer-Length, upload-defer-length, Upload-Concat, upload-concat, x-file-name, x-last-chunk, x-chunk-start, x-upload-id, x-request-id" always; # Быстрая обработка preflight (если бэкенд недоступен) if ($request_method = OPTIONS) { return 204; } @@ -135,4 +135,4 @@ server { proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Request-Id $req_id; } -} \ No newline at end of file +} diff --git a/start.sh b/start.sh old mode 100644 new mode 100755