こんにちは。
Strict-Transport-Security ヘッダーを変更したいです。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';"
これは最初の出現箇所で機能します。
add_header Strict-Transport-Security 'max-age=63072000';
しかし、別の箇所に以下のようなものがあります。
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番目の Strict-Transport-Security ヘッダーの出現箇所が変更されないのはなぜですか?