مرحباً،
أرغب في تعديل ترويسة 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؟