new conf
This commit is contained in:
parent
e786142391
commit
c8b121fb16
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue