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

Fetch Metadata Browser Headers #441

Open
ThunderSon opened this issue Jun 15, 2020 · 1 comment
Open

Fetch Metadata Browser Headers #441

ThunderSon opened this issue Jun 15, 2020 · 1 comment

Comments

@ThunderSon
Copy link

Feature Request

Adding a new header

Is the header supported by any user agent? If so, which?

Chrome v76 and chromium-based browsers v79. Firefox is working to release this soon.

What does it do?

It's a resource isolation policy that the browser sends to the server in order to provide more context and allow the server to allow or deny the content access. Attacks such as CSRF, XSSI, XS-leaks, etc. will be much harder to pull once the server knows what the user-agent is allowing and expecting.

What are the headers for this policy?

  • Sec-Fetch-Site: ['same-origin', 'same-site', 'none', 'cross-site']
  • Sec-Fetch-Mode: ['same-origin', 'no-cors', 'cors', 'navigate']
  • Sec-Fetch-Dest: the destination of the returned content (e.g. image)

Where does the specification live?

https://www.w3.org/TR/fetch-metadata/
I'd recommend reading the following article before checking the specification:
https://web.dev/fetch-metadata/

CC: @lweichselbaum

@oreoshake
Copy link
Contributor

Thanks for the feature request @ThunderSon. Do you know if there is a corresponding issue/pr in rails/rails?

Similar to #275, I'd rather invest in rails core. Yes, this library supports all rack-based applications but I've been working on archiving this library for a long time in absence of someone willing to maintain this long-term.

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

No branches or pull requests

2 participants