From e60257d76143d6709959f7382a01647fe3204d23 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 22 Jan 2019 18:59:55 +0100 Subject: [PATCH] fix(core): update --- ts/smartnginx.snippets.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ts/smartnginx.snippets.ts b/ts/smartnginx.snippets.ts index ca12096..7f390f3 100644 --- a/ts/smartnginx.snippets.ts +++ b/ts/smartnginx.snippets.ts @@ -72,9 +72,8 @@ export let getBaseConfigString = () => { }; export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, destinationPortArg = 80) => { - const uniqueString = plugins.smartunique.shortId(); const hostConfig = plugins.smartstring.indent.normalize(` - upstream ${uniqueString} { + upstream ${hostNameArg} { keepalive 100; server ${destinationIpArg}:${destinationPortArg}; } @@ -96,11 +95,10 @@ 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 X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://${uniqueString}; + proxy_pass http://${hostNameArg}; } } `);