-
Notifications
You must be signed in to change notification settings - Fork 121
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(CSP): Added optional custom impl function that creates a report-uri #67
base: master
Are you sure you want to change the base?
Conversation
1425157
to
6043229
Compare
Looks good to me. |
@@ -71,6 +71,7 @@ If enabled, the CSRF token must be in the payload when modifying data or you wil | |||
* `options.policy` Object - Object definition of policy. | |||
* `options.reportOnly` Boolean - Enable report only mode. | |||
* `options.reportUri` String - URI where to send the report data | |||
* `options.impl` Function - Optional. Custom implementation to create a report-uri. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to note in the documentation that the impl
will have high precedence over the reportUri
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thx!
Thx for the feedback @thefourtheye |
@@ -71,6 +71,7 @@ If enabled, the CSRF token must be in the payload when modifying data or you wil | |||
* `options.policy` Object - Object definition of policy. | |||
* `options.reportOnly` Boolean - Enable report only mode. | |||
* `options.reportUri` String - URI where to send the report data | |||
* `options.impl` Function - Custom implementation to create a report-uri (higher priority than `options.reportUri`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it is missing the optional
part.
This looks good. Any blocker? |
@turboMaCk does this satisfy your needs as well? |
impl
function that creates a report-uri. Used if you want to tack on a token or some unique identifier to the end of the report-uri to help identify a user or session (for logging, analytics, etc.)/cc @jasisk