From 893a2e2709db62369c7b7a14c8f6a788c39099ef Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 22 Jan 2019 12:33:47 +0100 Subject: [PATCH] fix(core): update --- ts/smartnginx.snippets.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/smartnginx.snippets.ts b/ts/smartnginx.snippets.ts index d70c252..23736e5 100644 --- a/ts/smartnginx.snippets.ts +++ b/ts/smartnginx.snippets.ts @@ -72,7 +72,7 @@ export let getBaseConfigString = () => { }; export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, destinationPortArg = 80) => { - let uniqueString = plugins.smartunique.shortId() + const uniqueString = plugins.smartunique.shortId(); const hostConfig = plugins.smartstring.indent.normalize(` upstream ${uniqueString} { keepalive 100; @@ -96,7 +96,7 @@ export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, location / { proxy_http_version 1.1; proxy_buffering off; - proxy_set_header Host $http_host; + proxy_set_header Host $http_host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;