Conversation
|
Hi @loremotta33, thanks so much for this PR! This looks like a worthy change to upstream, however I just have some confusion around how exactly we should support this directive in the library. It looks like to support this directive, we'll also need to support the |
|
That's a great catch @rzhade3, I have not noticed that the I'm not sure if the tables are correct or up to date though, as I just downloaded the latest Opera version (
If you think it makes sense to add support to the I thought of initially adding support for it on this Pull Request but I was not sure if it was something that would be wanted or not for the gem |
|
@loremotta33 Thanks for doing that research! Given that it is strictly needed to implement |
7a40427 to
f2cd70b
Compare
|
@rzhade3 , sorry for the delay on this, I have been pretty busy the last days. I just pushed a commit to add |

I added the
secure_headersgem to my project as we needed to implement CSP. When configuring the policy, I was going to add thereport-todirective as it seems thatreport-urihas been deprecated. I noticed that the gem does not have support for this configuration so decided to add it.All PRs:
Adding a new CSP directive
Is the directive supported by any user agent? If so, which?
Yes, it's supported by all main browsers except Firefox.
What does it do?
It's used to indicate the name of the endpoint that the browser should use for reporting CSP violations. Intends to replace deprecated
report-uridirective. Browsers should fallback thoreport-uriifreport-tonot supported, so it's recommended to set both directives.An array of endpoints is supported. But if more than one endpoint is provided, browser will default to use the first one. I added it to
report-urito preserve the scheme, as as far as I checked, there is no restriction on the naming of the endpoint.This directive is directly tied to the Reporting-Endpoints HTTP header, at the moment on my project I'm manually adding the
Reporting-Endpointsheader through the Railsdefault_headersconfiguration, I do not know if managing this header through the gem is something on the scope of the gem.Here is the specification for
report-to.