THREESCALE-11928: Support Permissions-Policy header#4207
Open
jlledom wants to merge 2 commits into3scale:masterfrom
Open
THREESCALE-11928: Support Permissions-Policy header#4207jlledom wants to merge 2 commits into3scale:masterfrom
Permissions-Policy header#4207jlledom wants to merge 2 commits into3scale:masterfrom
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Another config file 🤮 |
Contributor
Author
Thanks for your feed-back 😉. This config file and CSP one are optional, you can not provide them and everything should work as before. Don't say I don't care about you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
This PR allows the user to set their desired value for the
Permissions-Policyheader as a yaml file. ExampleWith this config, the user can set:
The code here is very similar to what I did in #4185. I told claude to get inspiration from that PR and adapt it for permissions policy, since the rails backend for both headers is shared. My plan is to make a few changes before both PRs are merged to try to remove a bit of duplication.
Like in the CSP PR, the changes here are:
application.rbWhich issue(s) this PR fixes
https://issues.redhat.com/browse/THREESCALE-11928
Verification steps
A fast way to test this is:
When forbidden, you should see the error in the console; when allowed, you should a prompt from the browser asking for permission.
Special notes for your reviewer:
A couple of comments:
Feature-Policybut was recently renamed toPermissions-Policywith a few additional features. Rails only supports the old one, so that's the header we see in the request, future Rails versions should add support for the new header.