From 9bb847210a6db6f63a3aea4d6312e45f99d59644 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sat, 19 Jan 2019 15:42:45 +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 c7cb00b..16a65e3 100644 --- a/ts/smartnginx.snippets.ts +++ b/ts/smartnginx.snippets.ts @@ -71,7 +71,7 @@ export let getBaseConfigString = () => { return baseConfig; }; -export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, portArg = 80) => { +export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, destinationPortArg = 80) => { const hostConfig = plugins.smartstring.indent.normalize(` upstream ${hostNameArg} { keepalive 100; @@ -101,7 +101,7 @@ export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, 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; - proxy_pass http://${hostNameArg}:${portArg}; + proxy_pass http://${hostNameArg}:${destinationPortArg}; } } `);