Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Referrer-Policy: expand applicable media-types + stricter default #204

Merged
merged 6 commits into from
Jan 3, 2020

Conversation

Malvoz
Copy link
Contributor

@Malvoz Malvoz commented Nov 12, 2019

This PR does 2 things:

I simplified the Referrer-Policy description as well, current text is more or less copy&paste from spec and is not super developer-friendly.

@Malvoz
Copy link
Contributor Author

Malvoz commented Nov 12, 2019

Spec change (!) to have strict-origin-when-cross-origin be the new default

To emphasize, if we don't change the example policy, then people who enable it as-is will downgrade and send more referrer information than the new default value.

@LeoColomb
Copy link
Member

You know my sensitivity regarding coverage. 😉
If we merge it and deploy on servers today, is this value accepted and strong enough?

@Malvoz
Copy link
Contributor Author

Malvoz commented Nov 14, 2019

Coverage is important, indeed!

To clarify, the strict-origin-when-cross-origin value already has quite the coverage (CanIUse). In versions of a browser where it isn't supported, it will be treated as an unknown policy value and defer to the default policy (no-referrer-when-downgrade in current browsers, strict-origin-when-cross-origin in those who implement the spec change).

strong enough?

While it is stronger than no-referrer-when-downgrade, the strongest policy is no-referrer (see this MDN table for comparisons), but because people love their analytics metrics, I think it's best to avoid that as the example policy (see the notes on that).

Copy link
Member

@LeoColomb LeoColomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it looks good for me 👍

@LeoColomb LeoColomb requested a review from XhmikosR November 15, 2019 09:16
@XhmikosR
Copy link
Member

Do we have any info that this is indeed useful for non-HTML resources? Sorry, I don't have the time to follow this repo closely nowadays.

@Malvoz
Copy link
Contributor Author

Malvoz commented Nov 16, 2019

I think the most explicit information I have found for this is in the Referrer-Policy spec under the section "integration with CSS" (linked to in #204 (comment)):

ISSUE 1   This requires that CSS style sheets process Referrer-Policy headers, and store a referrer policy in the same way that Documents do.

I interpret that as advice for developers to set the header for stylesheets.

@Malvoz
Copy link
Contributor Author

Malvoz commented Nov 19, 2019

And partially confirmed in https://www.chromestatus.com/feature/5696724538490880.

@LeoColomb LeoColomb merged commit 43bcb83 into h5bp:master Jan 3, 2020
LeoColomb added a commit to h5bp/server-configs-nginx that referenced this pull request Jan 3, 2020
DeepInThought added a commit to DeepInThought/server-configs-nginx that referenced this pull request Jan 23, 2020
* Bump server-config-test to 1.2.1

* Additional compression method added for gzip (h5bp#236)

* Fixed description for SSL session cache & timeout (h5bp#237)

* Add  `font/ttf` & `font/eot` to compressible mime-types list (h5bp#242)

Ref:
* jshttp/mime-db#169
* developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/webfont-optimization#reducing_font_size_with_compression

* Improve HSTS documentation

Ref: h5bp/server-configs-apache#196

* Stricter default for Referrer Policy

Ref: h5bp/server-configs-apache#204

* Add funding file

* Rename no-transform.conf file to content_transformation.conf

Align with other files and with Apache struct

Co-authored-by: Léo Colombaro <git@colombaro.fr>
Co-authored-by: Jogendra Kumar <39511714+jkumar-roambee@users.noreply.github.com>
Co-authored-by: Rahil <54960886+plethorahil@users.noreply.github.com>
Co-authored-by: minusf <minusf@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants