Skip to content

Commit

Permalink
increase proxy buffer size
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Pawelek <[email protected]>
  • Loading branch information
npawelek committed Feb 9, 2024
1 parent f2a483b commit 9bb4730
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
7 changes: 7 additions & 0 deletions kubernetes/apps/auth/authentik/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ spec:
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.org/websocket-services: authentik
nginx.ingress.kubernetes.io/enable-global-auth: "false"
nginx.ingress.kubernetes.io/client-body-buffer-size: 256k
nginx.ingress.kubernetes.io/client-header-buffer-size: "256k"
nginx.ingress.kubernetes.io/large-client-header-buffers: "4 256k"
nginx.ingress.kubernetes.io/proxy-buffer-size: "256k"
nginx.ingress.kubernetes.io/server-snippet: |
client_header_buffer_size 256k;
large_client_header_buffers 4 256k;
hajimari.io/icon: mdi:account-lock
hajimari.io/enable: "true"
hosts:
Expand Down
7 changes: 4 additions & 3 deletions kubernetes/apps/ingress/nginx/external/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ spec:
# https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap
config:
block-user-agents: "GPTBot,~*GPTBot*,ChatGPT-User,~*ChatGPT-User*,Google-Extended,~*Google-Extended*,CCBot,~*CCBot*,Omgilibot,~*Omgilibot*,FacebookBot,~*FacebookBot*" # taken from https://github.com/superseriousbusiness/gotosocial/blob/main/internal/web/robots.go
client-body-buffer-size: 100M
client-body-timeout: 120
client-header-timeout: 120
custom-http-errors: 400,401,403,404,500,502,503,504
enable-brotli: "true"
enable-real-ip: "true"
Expand All @@ -85,6 +82,10 @@ spec:
"http_user_agent": "$http_user_agent"}
proxy-body-size: 0
proxy-buffer-size: 16k
large-client-header-buffers: "4 8k"
client-body-buffer-size: 100M
client-body-timeout: 120
client-header-timeout: 120
ssl-protocols: TLSv1.3 TLSv1.2
metrics:
enabled: true
Expand Down
7 changes: 4 additions & 3 deletions kubernetes/apps/ingress/nginx/internal/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ spec:
proxy_set_header X-Forwarded-Host $http_host;
whitelist-source-range: "10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
block-user-agents: "GPTBot,~*GPTBot*,ChatGPT-User,~*ChatGPT-User*,Google-Extended,~*Google-Extended*,CCBot,~*CCBot*,Omgilibot,~*Omgilibot*,FacebookBot,~*FacebookBot*" # taken from https://github.com/superseriousbusiness/gotosocial/blob/main/internal/web/robots.go
client-body-buffer-size: 100M
client-body-timeout: 120
client-header-timeout: 120
custom-http-errors: 400,401,403,404,500,502,503,504
enable-brotli: "false"
enable-real-ip: "true"
Expand All @@ -92,6 +89,10 @@ spec:
"http_user_agent": "$http_user_agent"}
proxy-body-size: 0
proxy-buffer-size: 16k
large-client-header-buffers: "4 8k"
client-body-buffer-size: 100M
client-body-timeout: 120
client-header-timeout: 120
ssl-protocols: TLSv1.3 TLSv1.2
metrics:
enabled: true
Expand Down

0 comments on commit 9bb4730

Please sign in to comment.