From d550bb2b55b325c21ecba05c6a4e34b2ddc19f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sim=C3=B3=20Albert=20i=20Beltran?= Date: Wed, 26 May 2021 17:30:40 +0200 Subject: [PATCH 1/2] Configure HAProxy to use camelcase Content-Type header --- docker/haproxy/haproxy.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/haproxy/haproxy.conf b/docker/haproxy/haproxy.conf index 8c20684..7b29f20 100644 --- a/docker/haproxy/haproxy.conf +++ b/docker/haproxy/haproxy.conf @@ -6,6 +6,7 @@ global daemon log 127.0.0.1 local0 tune.ssl.default-dh-param 2048 + h1-case-adjust content-type Content-Type defaults mode http @@ -21,6 +22,7 @@ global backlog 4096 maxconn 2000 option tcpka + option h1-case-adjust-bogus-client frontend website mode http From f9a96461a5efde1364f999b367bca32bafd45c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sim=C3=B3=20Albert=20i=20Beltran?= Date: Wed, 26 May 2021 19:26:08 +0200 Subject: [PATCH 2/2] Fix api duplicated headers --- docker/api/default.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/api/default.conf b/docker/api/default.conf index 0500d7f..2be29bd 100644 --- a/docker/api/default.conf +++ b/docker/api/default.conf @@ -20,7 +20,7 @@ server { location /json { alias /api/api/static/templates/header.json; - add_header Content-Type application/json; + default_type application/json; index header.json; expires max; log_not_found off; @@ -29,7 +29,7 @@ server { location /header/html { alias /api/api/static/templates/header.html; - add_header Content-Type text/html; + default_type text/html; index header.html; expires max; log_not_found off; @@ -38,7 +38,7 @@ server { location /header/html/nextcloud { alias /api/api/static/templates/header_nextcloud.html; - add_header Content-Type text/html; + default_type text/html; index header_nextcloud.html expires max; log_not_found off;