Compare commits

...

4 Commits

Author SHA1 Message Date
e94f0edafb 2.0.33 2019-01-22 18:25:44 +01:00
c417d96e48 fix(core): update 2019-01-22 18:25:43 +01:00
c5b1dbb46e 2.0.32 2019-01-22 12:33:48 +01:00
893a2e2709 fix(core): update 2019-01-22 12:33:47 +01:00
3 changed files with 4 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartnginx",
"version": "2.0.31",
"version": "2.0.33",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartnginx",
"version": "2.0.31",
"version": "2.0.33",
"private": false,
"description": "control nginx from node, TypeScript ready",
"main": "dist/index.js",

View File

@ -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;
@ -98,7 +98,7 @@ export let getHostConfigString = (hostNameArg: string, destinationIpArg: string,
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://${uniqueString};
}