From eabc4eb05ed65af392110330d21001897afc56c3 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sun, 13 Oct 2024 12:58:25 +0000 Subject: [PATCH] Update default.conf --- default.conf | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/default.conf b/default.conf index 81540a7..4aaad97 100644 --- a/default.conf +++ b/default.conf @@ -480,6 +480,50 @@ server { proxy_pass http://10.8.0.5:1492/webhook/create/; } + + location /squiz/bitrix/ { + if ($request_method = OPTIONS) { + add_header Access-Control-Allow-Origin $http_origin always; + add_header Access-Control-Allow-Credentials true always; + add_header Access-Control-Allow-Headers content-type,authorization,device,browser,os,devicetype,response-type always; + add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE; + return 200; + } + add_header Access-Control-Allow-Origin $http_origin always; + add_header Access-Control-Allow-Credentials true always; + add_header Access-Control-Allow-Headers content-type,authorization,device,browser,os,devicetype,response-type always; + add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE; + proxy_set_header Referer $host; + proxy_set_header Origin $http_origin; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Client-Port $remote_port; + proxy_set_header Origin $host; + + proxy_pass http://10.8.0.18:1492/bitrix/; + } + + + location /squiz/bitrix/oauth/ { + if ($request_method = OPTIONS) { + add_header Access-Control-Allow-Origin $http_origin always; + add_header Access-Control-Allow-Credentials true always; + add_header Access-Control-Allow-Headers content-type,authorization,device,browser,os,devicetype,response-type always; + add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE; + return 200; + } + add_header Access-Control-Allow-Origin $http_origin always; + add_header Access-Control-Allow-Credentials true always; + add_header Access-Control-Allow-Headers content-type,authorization,device,browser,os,devicetype,response-type always; + add_header Access-Control-Allow-Methods OPTIONS,GET,POST,PATCH,PUT,DELETE; + proxy_set_header Referer $host; + proxy_set_header Origin $http_origin; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Client-Port $remote_port; + proxy_set_header Origin $host; + + proxy_pass http://10.8.0.18:1492/webhook/create/; + } + location /answer/v1.0.0/ {