Skip to content

Commit

Permalink
If empty, just skip base-uri.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-scott committed Feb 11, 2016
1 parent 5fa8036 commit 478ff9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CSPBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public function compile()

foreach(self::$directives as $dir) {
if (\in_array($dir, $ruleKeys)) {
if (empty($ruleKeys)) {
if ($dir === 'base-uri') {
continue;
}
}
$compiled []= $this->compileSubgroup(
$dir,
$this->policies[$dir]
Expand Down

0 comments on commit 478ff9b

Please sign in to comment.