From dcf44a6f57e4dd3d0f6f822aa6172e66991e74ea Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Wed, 24 Oct 2018 08:56:14 +1100 Subject: [PATCH] correct template to insert policy at the right spot --- templates/web.ssl.template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/web.ssl.template.yml b/templates/web.ssl.template.yml index a76ae0d..8999c54 100644 --- a/templates/web.ssl.template.yml +++ b/templates/web.ssl.template.yml @@ -39,7 +39,7 @@ run: } - replace: filename: "/etc/nginx/conf.d/discourse.conf" - from: /add_header Referrer-Policy 'no-referrer-when-downgrade';/m + from: "location @discourse {" to: | - add_header Referrer-Policy 'no-referrer-when-downgrade'; + location @discourse { add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain -- 2.25.1