From 5b76c5bbfb948172bd9ccd7bae5bbffdb37dea93 Mon Sep 17 00:00:00 2001 From: genxium Date: Wed, 18 Jan 2023 18:03:54 +0800 Subject: [PATCH] Minor fix. --- nginx-templates/tsrht.lokcol.conf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nginx-templates/tsrht.lokcol.conf b/nginx-templates/tsrht.lokcol.conf index 2c84976..a223f1a 100644 --- a/nginx-templates/tsrht.lokcol.conf +++ b/nginx-templates/tsrht.lokcol.conf @@ -66,4 +66,21 @@ hp application/json application/javascript; proxy_pass http://tsrht_cluster/tsrht$is_args$args; } + + location ~^/tsrhtSecondary$ { + # Reference http://www.tornadoweb.org/en/stable/guide/running.html + proxy_pass_header Server; + proxy_set_header Host $http_host; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Scheme $scheme; + + # Reverse-proxy for ws connection. + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_pass http://tsrht_cluster/tsrhtSecondary$is_args$args; + } }