laster13
Bonsoir à tous
Je laisse la réponse au cas ou l'un d'entre vous en aurait besoin un jour.
En fait pour que le HSTS soit actif derrière une authentification
"www-authenticate: Basic realm="seedbox"
il faut rajouter always à la fin.
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload" always;
même chose pour
add_header X-Frame-Options SAMEORIGIN always;
add_header X-Content-Type-Options nosniff always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "no-referrer" always;
add_header Content-Security-Policy "form-action 'none'; 'block-all-mixed-content'; 'upgrade-insecure-requests', frame-ancestors https://*.domain.ltd" always;
etc ...
du coup voila le résultat
root@mail:/tmp# curl -I https://domain.ltd
HTTP/2 401
server: nginx
date: Mon, 07 May 2018 17:33:32 GMT
content-type: text/html; charset=utf-8
content-length: 188
www-authenticate: Basic realm="seedbox"
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: no-referrer
content-security-policy: form-action 'none'; 'block-all-mixed-content'; 'upgrade-insecure-requests', frame-ancestors https://*.domain.ltd
Config pour rutorrent😏