Skip to content

Fix inability to disable Connection and Upgrade NGINX headers

Stan Hu requested to merge sh-fix-issue-4873 into master

Since the proxy_set_headers are defined as node attributes, Chef does a deep merge and makes it impossible to disable them. For example, when { "Connection" => "$upgrade" } gets merged with { "Connection" => nil }, the value in the node attributes wins, resulting in { "Connection" => "$upgrade" }.

To fix this, if the user nulls out the header, we delete the header from the default attribute directly.

Closes #4873 (closed)

Edited by GitLab Release Tools Bot

Merge request reports