incubateur-ademe / quefairedemesdechets

MIT License
6 stars 5 forks source link

Send referrer to LVAO iframe #132

Closed fabienheureux closed 3 weeks ago

fabienheureux commented 3 weeks ago

Le header Referrer-policy définit la manière dont va être communiquée l'URL courante aux éventuelles iframe.

Par défaut il est défini à same-origin sur Netlify, ce qui nous empêche d'avoir ces infos côté posthog LVAO.

On peut le supplanter via l'attribut referrerpolicy, c'est testé et ça fonctionne comme on le souhaite.

strict-origin-when-cross-origin (default) This is the user agent's default behavior if no policy is specified. Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP).

Cf :

On a bien la preview qui remonte dans posthog

image