correct template to insert policy at the right spot

correct template to insert policy at the right spot

From dcf44a6f57e4dd3d0f6f822aa6172e66991e74ea Mon Sep 17 00:00:00 2001
From: Sam Saffron <sam.saffron@gmail.com>
Date: Wed, 24 Oct 2018 08:56:14 +1100
Subject: [PATCH] correct template to insert policy at the right spot


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

GitHub

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: