Browse Source
Merge pull request #4599 from Budibase/hotfix/public-app-url
Forward Host header to worker and server through NGINX
pull/4607/head
Rory Powell
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
5 deletions
-
hosting/nginx.dev.conf.hbs
-
hosting/nginx.prod.conf.hbs
|
|
|
@ -11,6 +11,7 @@ events { |
|
|
|
http { |
|
|
|
include /etc/nginx/mime.types; |
|
|
|
default_type application/octet-stream; |
|
|
|
proxy_set_header Host $host; |
|
|
|
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
|
|
|
'$status $body_bytes_sent "$http_referer" ' |
|
|
|
@ -67,7 +68,6 @@ http { |
|
|
|
proxy_http_version 1.1; |
|
|
|
proxy_set_header Connection $connection_upgrade; |
|
|
|
proxy_set_header Upgrade $http_upgrade; |
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
} |
|
|
|
@ -76,7 +76,6 @@ http { |
|
|
|
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_set_header Host $http_host; |
|
|
|
|
|
|
|
proxy_connect_timeout 300; |
|
|
|
proxy_http_version 1.1; |
|
|
|
|
|
|
|
@ -12,6 +12,7 @@ http { |
|
|
|
limit_req_zone $binary_remote_addr zone=ratelimit:10m rate=20r/s; |
|
|
|
include /etc/nginx/mime.types; |
|
|
|
default_type application/octet-stream; |
|
|
|
proxy_set_header Host $host; |
|
|
|
charset utf-8; |
|
|
|
sendfile on; |
|
|
|
tcp_nopush on; |
|
|
|
@ -83,7 +84,6 @@ http { |
|
|
|
proxy_http_version 1.1; |
|
|
|
proxy_set_header Connection $connection_upgrade; |
|
|
|
proxy_set_header Upgrade $http_upgrade; |
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
proxy_pass http://$apps:4002; |
|
|
|
@ -110,7 +110,6 @@ http { |
|
|
|
proxy_http_version 1.1; |
|
|
|
proxy_set_header Connection $connection_upgrade; |
|
|
|
proxy_set_header Upgrade $http_upgrade; |
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
|
|
@ -126,7 +125,6 @@ http { |
|
|
|
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_set_header Host $http_host; |
|
|
|
|
|
|
|
proxy_connect_timeout 300; |
|
|
|
proxy_http_version 1.1; |
|
|
|
|