From 9bb5096f1cd8a03d50d5f60ba6eb29dcd56fd9b2 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sun, 13 Mar 2022 23:04:31 -0700 Subject: [PATCH] nginx: enable underscores in headers chatwoot requires this https://www.chatwoot.com/docs/self-hosted/deployment/caprover#api-requests-failing-with-you-need-to-sign-in-or-sign-up-before-continuing They are apparently disabled by default since they conflict with some CGI headers: https://stackoverflow.com/questions/22856136/why-do-http-servers-forbid-underscores-in-http-header-names https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/?highlight=disappearing%20http%20headers#missing-disappearing-http-headers --- src/nginxconfig.ejs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nginxconfig.ejs b/src/nginxconfig.ejs index 5c56bf141..93939991a 100644 --- a/src/nginxconfig.ejs +++ b/src/nginxconfig.ejs @@ -88,6 +88,9 @@ server { ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256; ssl_prefer_server_ciphers off; + # some apps have underscores in headers. this is apparently disabled by default because of some legacy CGI compat + underscores_in_headers on; + <% if (endpoint !== 'ip' && endpoint !== 'setup') { -%> # dhparams is generated only after dns setup ssl_dhparam /home/yellowtent/platformdata/dhparams.pem;