18

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 

2 Answers 2

23

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

2
  • Referrer-Policy is different than X-Frame-Options. See: w3.org/TR/referrer-policy Commented Jan 23, 2018 at 21:59
  • @iglvzx Thank you. I've got it since this post has been published. Commented Jan 23, 2018 at 22:18

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.