I am looking for a way to set Referrer policy - No Referrer

I am looking for a way to set a Referrer policy - No Referrer through Cloudflare but not in Javascript. Can you please tell me how I get to this?

Sure. You can go to Rules → Transform Rules → Modify Response Header on your domain.

You can then create a new rule, named whatever you wish, and have it apply to all requests (chances are you want it on every page).

in the “Then” section select “set static” and enter “Referrer-Policy” and “no-referrer”.

Note that the default is strict-origin-when-cross-origin, which is probably all you want anyways, which would mean you don’t need to configure this at all. The default is described as:

Send the origin, path, and querystring when performing a same-origin request. For cross-origin requests send the origin (only) when the protocol security level stays same (HTTPS→HTTPS). Don’t send the Referer header to less secure destinations (HTTPS→HTTP).

See this for possible other values for the header: Referrer-Policy - HTTP | MDN

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.