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

feat: report-to #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat: report-to #30

wants to merge 1 commit into from

Conversation

sericaia
Copy link

@sericaia sericaia commented Apr 2, 2019

This is work in progress. report-to aims to replace report-uri in CSP 3 but it only has support in certain browsers (chrome and android > v70).

Basically what is missing from this PR is a rule in Joi that supports the desired behaviour and add it in schema.

So we want to have the following different rules:

  • use report-only only when report-uri is present (as we currently have):
    schema.with('reportOnly', 'reportUri');

  • same as before, but for report-to (when reportTo replaces reportUri):
    schema.with('reportOnly', 'reportTo');

  • we can also have both reportUri and reportTo and the browser will decide which one to use

Something like schema.with('reportOnly', ['reportUri', 'reportTo']); or using object.or schema.or(schema.with('reportOnly', 'reportUri'), schema.with('reportOnly', 'reportTo'))

I couldn't find a way to properly do it in Joi. @nlf do you know if it is possible in any way?

@sericaia
Copy link
Author

sericaia commented Apr 2, 2019

There is also a dependency from report-to CSP property and Report-to header, but I don't think we can cover it in this module... (it is a bit different to what we have with content-security-policy-report-only header)

@nlf
Copy link
Owner

nlf commented Apr 24, 2019

so the issue here is that the reportOnly option requires one or both of reportUri and reportTo?

also re: the Report-To header, in my opinion if that header is used for CSP purposes we should probably support it..

@sericaia
Copy link
Author

sericaia commented May 1, 2019

yes ;) is there any way I am not seeing to do it?

you mean supporting Report-to header in Blankie? isnt it a bit out of scope since it is not under CSP header?

@maharjanraj
Copy link

Is this repo no longer maintained?

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