안녕하세요,
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
제가 무언가를 잘못하고 있는 것인가요? 왜 Strict-Transport-Security 헤더의 두 번째 발생 위치는 수정되지 않는 것인가요?