From 94e4ee1221912cbb77e1c1695c1d760bfe35ed2b Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 18 Feb 2023 23:40:45 +0100 Subject: [PATCH] enhance is_account_domain mechanism --- conf/nginx.conf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 8d99949..7942534 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,8 +4,7 @@ if ($host = __ACCOUNT_DOMAIN__) { set $is_account_domain 1; } -#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { +location / { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -18,7 +17,9 @@ location __PATH__/ { rewrite ^ https://__PATH__$request_uri? permanent; } - proxy_pass http://localhost:__PORT__; + if ($is_account_domain = 0) { + proxy_pass http://localhost:__PORT__; + } client_max_body_size __CLIENT_MAX_BODY_SIZE__;