From b9e18a167c875efa1cbd2b3d3e1054c18dc3fdb3 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Fri, 3 Nov 2023 13:07:53 +0100 Subject: [PATCH] fix: keycloak nginx buffer size Tune according to https://www.getpagespeed.com/server-setup/nginx/tuning-proxy_buffer_size-in-nginx --- hosts/nachtigall/apps/keycloak.nix | 1 + hosts/nachtigall/apps/nginx.nix | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/hosts/nachtigall/apps/keycloak.nix b/hosts/nachtigall/apps/keycloak.nix index c5fc2f7..9db430b 100644 --- a/hosts/nachtigall/apps/keycloak.nix +++ b/hosts/nachtigall/apps/keycloak.nix @@ -25,6 +25,7 @@ "/" = { extraConfig = '' proxy_pass http://127.0.0.1:8080; + proxy_buffer_size 8k; ''; }; }; diff --git a/hosts/nachtigall/apps/nginx.nix b/hosts/nachtigall/apps/nginx.nix index 65ad988..5dd659c 100644 --- a/hosts/nachtigall/apps/nginx.nix +++ b/hosts/nachtigall/apps/nginx.nix @@ -19,6 +19,10 @@ in { recommendedOptimisation = true; recommendedProxySettings = true; recommendedTlsSettings = true; + appendHttpConfig = '' + # https://nginx.org/en/docs/hash.html + proxy_headers_hash_max_size 1024; + ''; }; security.acme = {