Bonjour,
Je souhaite modifier l’en-tête Strict-Transport-Security. J’utilise ce code dans mon app.yml :
run:
# modifications nginx
- 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';"
Cela fonctionne pour la première occurrence :
add_header Strict-Transport-Security 'max-age=63072000';
Mais il y en a une autre avec :
location @discourse {
add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain
Est-ce que je fais quelque chose de mal ? Pourquoi la deuxième occurrence de l’en-tête Strict-Transport-Security n’est-elle pas modifiée ?