Hallo,
Ich möchte den Strict-Transport-Security-Header ändern. Ich verwende diesen Code in meiner 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';"
Dies funktioniert für das erste Vorkommen:
add_header Strict-Transport-Security 'max-age=63072000';
Aber es gibt noch eine weitere mit:
location @discourse {
add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain
Mache ich etwas falsch? Warum wird das zweite Vorkommen des Strict-Transport-Security-Headers nicht geändert?