From bb44378ad8e56bfdae706737fb4590542a9a8e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Tue, 23 Jun 2026 11:55:20 +0400 Subject: [PATCH] v1.0.144: fix duplicate CORS /upload --- deploy/nginx-contracts.conf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/deploy/nginx-contracts.conf b/deploy/nginx-contracts.conf index e4b83ab..efb16a8 100644 --- a/deploy/nginx-contracts.conf +++ b/deploy/nginx-contracts.conf @@ -44,10 +44,13 @@ server { } location /upload { - add_header Access-Control-Allow-Origin "*"; - add_header Access-Control-Allow-Methods "POST, OPTIONS"; - add_header Access-Control-Allow-Headers "*"; - if ($request_method = OPTIONS) { return 204; } + if ($request_method = OPTIONS) { + add_header Access-Control-Allow-Origin "*"; + add_header Access-Control-Allow-Methods "POST, OPTIONS"; + add_header Access-Control-Allow-Headers "*"; + add_header Content-Length 0; + return 204; + } proxy_pass http://127.0.0.1:8766; proxy_read_timeout 300s; client_max_body_size 100m;