Hello there,
I want to modify the Strict-Transport-Security header. I use this code in my app.yml:
run:
# nginx modifications
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: /add_header Strict-Transport-Security.+/
to: "add_header Strict-Transport-Security 'max-age=31536000; includeSubdomains; preload';"
This works for the first occurrence:
add_header Strict-Transport-Security 'max-age=63072000';
But there is another one with:
location @discourse {
add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain
Am I doing something wrong? Why is the second occurrence of Strict-Transport-Security header not modified?