From d5c5fe3098106d86fd66cc21c7a63286b2901c19 Mon Sep 17 00:00:00 2001 From: missytake Date: Wed, 13 Mar 2024 15:25:42 +0100 Subject: [PATCH] nginx: allow underscores in headers --- pyinfra_nginx/proxy_pass.nginx_config.j2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyinfra_nginx/proxy_pass.nginx_config.j2 b/pyinfra_nginx/proxy_pass.nginx_config.j2 index f2968be..50b6e61 100644 --- a/pyinfra_nginx/proxy_pass.nginx_config.j2 +++ b/pyinfra_nginx/proxy_pass.nginx_config.j2 @@ -1,8 +1,9 @@ server { - server_name {{ domain }}; - client_max_body_size 512m; + server_name {{ domain }}; + client_max_body_size 512m; + underscores_in_headers on; - location / { + location / { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;