Skip to content

Commit

Permalink
Add 'url' type value for report-uri
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltott authored Jan 19, 2023
1 parent 1a1a85f commit f580025
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CSPBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function compile(): string
if (!is_string($this->policies['report-uri'])) {
throw new TypeError('report-uri policy somehow not a string');
}
$compiled [] = 'report-uri ' . $this->enc($this->policies['report-uri']) . '; ';
$compiled [] = 'report-uri ' . $this->enc($this->policies['report-uri'], 'url') . '; ';
}
if (!empty($this->policies['report-to'])) {
if (!is_string($this->policies['report-to'])) {
Expand Down

0 comments on commit f580025

Please sign in to comment.