From 2f8097cdd4bc8def3ae65d7971fd312289266010 Mon Sep 17 00:00:00 2001 From: Nick Craig Date: Wed, 9 Mar 2022 11:29:27 -0500 Subject: [PATCH] removing HSTS include from location as it is superfluous. HSTS is defined at the server level and re-adding the host at the location prevents inheritance from the advanced config include. Per the NGINX documentation, "These directives are inherited from the previous configuration level if and only if there are no add_header directives defined on the current level." --- backend/templates/proxy_host.conf | 2 -- backend/templates/redirection_host.conf | 2 -- 2 files changed, 4 deletions(-) diff --git a/backend/templates/proxy_host.conf b/backend/templates/proxy_host.conf index ec30cca0..173f173e 100644 --- a/backend/templates/proxy_host.conf +++ b/backend/templates/proxy_host.conf @@ -51,8 +51,6 @@ proxy_http_version 1.1; {% endif %} -{% include "_hsts.conf" %} - {% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %} proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; diff --git a/backend/templates/redirection_host.conf b/backend/templates/redirection_host.conf index 339fe72e..08607e1a 100644 --- a/backend/templates/redirection_host.conf +++ b/backend/templates/redirection_host.conf @@ -16,8 +16,6 @@ server { {% if use_default_location %} location / { -{% include "_hsts.conf" %} - {% if preserve_path == 1 or preserve_path == true %} return {{ forward_http_code }} {{ forward_scheme }}://{{ forward_domain_name }}$request_uri; {% else %}