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; + } }