This commit is contained in:
root 2025-09-25 06:58:10 +00:00
parent e786142391
commit c8b121fb16
3 changed files with 4 additions and 3 deletions

View File

@ -77,6 +77,7 @@ services:
- -hooks-http=http://backend-app:${SANIC_PORT:-8080}/api/v1/upload.tus-hook - -hooks-http=http://backend-app:${SANIC_PORT:-8080}/api/v1/upload.tus-hook
- -hooks-http-forward-headers=Authorization,X-Upload-Metadata - -hooks-http-forward-headers=Authorization,X-Upload-Metadata
- -behind-proxy - -behind-proxy
- -disable-cors
environment: environment:
- TUSD_LOG_LEVEL=info - TUSD_LOG_LEVEL=info
volumes: volumes:

View File

@ -66,8 +66,8 @@ server {
# CORS (для API и префлайтов) # CORS (для API и префлайтов)
add_header Access-Control-Allow-Origin * always; add_header Access-Control-Allow-Origin * always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always; add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, PATCH, HEAD" 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-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 (если бэкенд недоступен) # Быстрая обработка preflight (если бэкенд недоступен)
if ($request_method = OPTIONS) { return 204; } if ($request_method = OPTIONS) { return 204; }
@ -135,4 +135,4 @@ server {
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Request-Id $req_id; proxy_set_header X-Request-Id $req_id;
} }
} }

0
start.sh Normal file → Executable file
View File