fix(core): update

This commit is contained in:
Philipp Kunz 2019-01-22 18:59:55 +01:00
parent e94f0edafb
commit e60257d761

View File

@ -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};
}
}
`);