fixes for k8s

This commit is contained in:
Martin McKeaveney 2022-02-11 19:04:27 +01:00
parent 27c0eafaf9
commit 57e554a98b
2 changed files with 22 additions and 8 deletions

View File

@ -25,7 +25,6 @@ http {
client_max_body_size 10M;
ignore_invalid_headers off;
proxy_buffering off;
port_in_redirect off;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
@ -39,6 +38,7 @@ http {
listen 10000 default_server;
listen [::]:10000 default_server;
server_name _;
port_in_redirect off;
# Security Headers
add_header X-Frame-Options SAMEORIGIN always;
@ -71,7 +71,13 @@ http {
proxy_pass http://app-service.budibase.svc.cluster.local:4002;
}
location ^/(builder|app_) {
location ~ ^/(builder|app_) {
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://app-service.budibase.svc.cluster.local:4002;
}
@ -113,11 +119,11 @@ http {
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_set_header Connection "";
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_connect_timeout 300;
proxy_http_version 1.1;
proxy_set_header Connection "";
chunked_transfer_encoding off;
proxy_pass http://minio-service.budibase.svc.cluster.local:9000;
}

View File

@ -24,8 +24,6 @@ http {
client_header_buffer_size 1k;
client_max_body_size 1k;
ignore_invalid_headers off;
proxy_buffering off;
port_in_redirect off;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
@ -43,6 +41,7 @@ http {
client_max_body_size 1000m;
ignore_invalid_headers off;
proxy_buffering off;
port_in_redirect off;
# Security Headers
add_header X-Frame-Options SAMEORIGIN always;
@ -56,6 +55,7 @@ http {
}
location = / {
port_in_redirect off;
proxy_pass http://app-service:4002;
}
@ -64,6 +64,7 @@ http {
}
location /builder/ {
port_in_redirect off;
proxy_http_version 1.1;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
@ -73,7 +74,14 @@ http {
proxy_pass http://app-service:4002;
}
location ^/(builder|app_) {
location ~ ^/(builder|app_) {
port_in_redirect off;
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://app-service:4002;
}