Compare commits

...

4 Commits

Author SHA1 Message Date
44403863d1 2.0.30 2019-01-22 12:03:00 +01:00
5be21fa100 fix(core): update 2019-01-22 12:02:59 +01:00
042167c01e 2.0.29 2019-01-22 04:03:17 +01:00
db38d038ef fix(core): update 2019-01-22 04:03:17 +01:00
3 changed files with 3 additions and 8 deletions

2
package-lock.json generated
View File

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

View File

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

View File

@ -73,10 +73,6 @@ export let getBaseConfigString = () => {
export let getHostConfigString = (hostNameArg: string, destinationIpArg: string, destinationPortArg = 80) => {
const hostConfig = plugins.smartstring.indent.normalize(`
upstream ${hostNameArg} {
keepalive 100;
server ${destinationIpArg}:${destinationPortArg};
}
server {
# The keepalive parameter sets the maximum number of idle keepalive connections
@ -95,13 +91,12 @@ export let getHostConfigString = (hostNameArg: string, destinationIpArg: string,
location / {
http2_push_preload on;
proxy_http_version 1.1;
proxy_redirect off;
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-Proto $scheme;
proxy_pass http://${hostNameArg};
proxy_pass http://${destinationIpArg}:${destinationPortArg};
}
}
`);