By Walid ETTAYEB

Qu'est-ce qu'une entête ?

Les en-têtes HTTP sont des valeurs qui sont affichées dans les messages de requête et de réponse dans l'en-tête de message pour HTTP. Ces en-têtes peuvent servir à indiquer au navigateur les données qu'il reçoit, par exemple un contenu PNG ou HTML. Les en-têtes peuvent également être utilisés pour accroître la sécurité et la confidentialité des visiteurs de votre site Web.

Security Headers

  • Strict-Transport-Security : Cette option oblige le navigateur à utiliser le protocole HTTPS.
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Strict-Transport-Security - HTTP | MDN
The HTTP Strict-Transport-Security response header (often abbreviated as HSTS) informs browsers that the site should only be accessed using HTTPS, and that any future attempts to access it using HTTP should automatically be converted to HTTPS.
  • X-Frame-Options : Indique au navigateur si vous souhaitez que votre site soit intégré dans un autre site ou non. Cela peut aider à se protéger contre des attaques telles que le clickjacking.
X-Frame-Options: SAMEORIGIN
X-Frame-Options - HTTP | MDN
The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a <frame>, <iframe>, <embed> or <object>. Sites can use this to avoid click-jacking attacks, by ensuring that their content is not embedded into other sites.
  • X-Content-Type-Options : Empêche le navigateur d'essayer de détecter le type de contenu par MIME et de s'en tenir à l'en-tête Content-Type déclaré.
X-Content-Type-Options: nosniff
X-Content-Type-Options - HTTP | MDN
The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised in the Content-Type headers should be followed and not be changed. The header allows you to avoid MIME typesniffing by saying that the MIME types are deliberately configur…
  • Referrer-Policy : Permet au site de contrôler la les informations que le navigateur transmet lorsqu'il se dirige vers un nouveau site.
Referrer-Policy: no-referrer
Referrer-Policy - HTTP | MDN
The Referrer-Policy HTTP header controls how much referrer information (sent with the Referer header) should be included with requests. Aside from the HTTP header, you can set this policy in HTML.
  • Permissions-Policy : Permet au site de contrôler les fonctionnalités et les API qui peuvent être utilisées dans le navigateur.
Content-Security-Policy - HTTP | MDN
The HTTP Content-Security-Policy response header allows web site administrators to control resources the user agent is allowed to load for a given page. With a few exceptions, policies mostly involve specifying server origins and script endpoints. This helps guard against cross-site scripting…
  • Expect-ct : Permet au site de déterminer s'il est compatible avec les prochaines exigences de Chrome en matière de transparence des certificats.
expect-ct: max-age=86400, enforce
Expect-CT - HTTP | MDN
The Expect-CT header lets sites opt in to reporting and/or enforcement of Certificate Transparency requirements, to prevent the use of misissued certificates for that site from going unnoticed.

Vous trouverez plus d'informations sur https://securityheaders.com ainsi qu'un scanner d'en-tête.

Walid ETTAYEB • 36 Articles

Passionné par l'informatique depuis mon plus jeune âge, je transforme ma passion en expertise.

View Articles