17

I'm not sure how can I add referrer policy header to my virtual host configuration file.

Let's say that I want to add something like this Referrer-Header: same-origin, should it be in this way:

Header set Referrer-Header: same-origin
tigun
  • 173
  • 1
  • 1
  • 4

2 Answers2

22

The header you're looking for is called Referrer-Policy, not "Referrer-Header".

As such, the correct way to set it would be:

Header always set Referrer-Policy "same-origin"
1

Not sure what you are asking, or trying to accomplish here...

SAMEORIGIN is a value for the X-Frame-Options header.

To make Apache send this header to all your pages, you would need to add this directive to your site config file :

Header always append X-Frame-Options SAMEORIGIN

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

https://httpd.apache.org/docs/current/en/mod/mod_headers.html

krisFR
  • 13,280
  • 4
  • 36
  • 42