From f5b437785d81f340ca62032c3ea5ed6423ceef93 Mon Sep 17 00:00:00 2001
From: nd <git@notandy.de>
Date: Thu, 7 Oct 2021 23:52:59 +0200
Subject: [PATCH] disable proxy buffering and add larger header buffer

---
 files/config/nginx.conf | 1 +
 templates/vhost.conf.j2 | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/files/config/nginx.conf b/files/config/nginx.conf
index b8780cf..59f8e3f 100644
--- a/files/config/nginx.conf
+++ b/files/config/nginx.conf
@@ -23,6 +23,7 @@ http {
 	types_hash_max_size 2048;
 	server_tokens off;
 	reset_timedout_connection on;
+	large_client_header_buffers 4 32k;
 
 	server_names_hash_bucket_size 64;
 	map_hash_bucket_size 64;
diff --git a/templates/vhost.conf.j2 b/templates/vhost.conf.j2
index 7cb386a..3d8fbb4 100644
--- a/templates/vhost.conf.j2
+++ b/templates/vhost.conf.j2
@@ -47,6 +47,8 @@ server {
 		{% if location.backend|d(False) %}
 		proxy_pass {{ location.backend }};
 
+		proxy_buffering off;
+
 		# add proxy headers
 		proxy_set_header Host			{{ vhost.host }};
 		proxy_set_header X-Real-IP		$remote_addr;
-- 
GitLab