Skip to content

Commit

Permalink
Extend nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
cbirkenbeul committed Dec 2, 2024
1 parent 48a1bba commit 3f3b9aa
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions k3s-cluster/apps/networking/ingress-nginx/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,31 @@ spec:
default: true
allowSnippetAnnotations: true
config:
client-header-timeout: 120
client-body-buffer-size: "100M"
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
enable-brotli: "true"
hsts-max-age: "31449600"
keep-alive: 120
enable-ocsp: "true"
enable-real-ip: "true"
force-ssl-redirect: "true"
hide-headers: Server,X-Powered-By
hsts-max-age: 31449600
keep-alive-requests: 10000
proxy-body-size: "100M"
ssl-protocols: "TLSv1.3 TLSv1.2"
keep-alive: 120
log-format-escape-json: "true"
log-format-upstream: >
{"time": "$time_iso8601", "remote_addr": "$proxy_protocol_addr", "x_forwarded_for": "$proxy_add_x_forwarded_for",
"request_id": "$req_id", "remote_user": "$remote_user", "bytes_sent": $bytes_sent, "request_time": $request_time,
"status": $status, "vhost": "$host", "request_proto": "$server_protocol", "path": "$uri", "request_query": "$args",
"request_length": $request_length, "duration": $request_time, "method": "$request_method", "http_referrer": "$http_referer",
"http_user_agent": "$http_user_agent", "country_code": "$geoip2_city_country_code", "country_name": "$geoip2_city_country_name"}
proxy-body-size: 0
proxy-buffer-size: 16k
ssl-protocols: TLSv1.3 TLSv1.2
strict-validate-path-type: "true"
use-geoip2: true
use-forwarded-headers: "true"
metrics:
enabled: true
serviceMonitor:
Expand Down

0 comments on commit 3f3b9aa

Please sign in to comment.