File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ # ----------------------------------------------------------------------
2
+ # | Referrer Policy |
3
+ # ----------------------------------------------------------------------
4
+
5
+ # A web application uses HTTPS and a URL-based session identifier.
6
+ # The web application might wish to link to HTTPS resources on other
7
+ # web sites without leaking the user's session identifier in the URL.
8
+ #
9
+ # This can be done by setting a `Referrer Policy` which
10
+ # whitelists trusted sources of content for your website.
11
+ #
12
+ # To check your referrer policy, you can use an online service
13
+ # such as: https://securityheaders.io/.
14
+ #
15
+ # https://scotthelme.co.uk/a-new-security-header-referrer-policy/
16
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
17
+
18
+ <IfModule mod_headers.c>
19
+
20
+ # no-referrer-when-downgrade (default)
21
+ # This should be the user agent's default behavior if no policy is
22
+ # specified.The origin is sent as referrer to a-priori as-much-secure
23
+ # destination (HTTPS->HTTPS), but isn't sent to a less secure destination
24
+ # (HTTPS->HTTP).
25
+
26
+ Header set Referrer-Policy "no-referrer-when-downgrade"
27
+
28
+ # `mod_headers` cannot match based on the content-type, however,
29
+ # the `Referrer-Policy` response header should be send
30
+ # only for HTML documents and not for the other resources.
31
+
32
+ <FilesMatch "\.(%FilesMatchPattern%)$">
33
+ Header unset Referrer-Policy
34
+ </FilesMatch>
35
+
36
+ </IfModule>
You can’t perform that action at this time.
0 commit comments