-
Notifications
You must be signed in to change notification settings - Fork 107
Fix #230: Make REPORT_PERCENTAGE a float #242
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,10 +110,9 @@ policy. | |
on the same origin. | ||
|
||
``REPORT_PERCENTAGE`` | ||
Percentage of requests that should see the ``report-uri`` directive. | ||
Use this to throttle the number of CSP violation reports made to your | ||
``report-uri``. An **integer** between 0 and 100 (0 = no reports at all). | ||
Ignored if ``report-uri`` isn't set. | ||
Percentage of requests that should see the ``report-uri`` directive. Use this to throttle the | ||
number of CSP violation reports made to your ``report-uri``. A **float** between 0.0 and 100.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Won't a float of
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be worthwhile to add a Django check in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it'd be nice, to help avoid surprises, but can be a follow-on thing or a ticket for someone in the community to pick up? |
||
(0.0 = no reports at all, 100.0 = always report). Ignored if ``report-uri`` isn't set. | ||
|
||
``DIRECTIVES`` | ||
A dictionary of policy directives. Each key in the dictionary is a directive and the value is a | ||
|
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.
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.
That was actually intentional to denote that 1.0 isn't included in the range that
random.random()
can return.