Skip to content

Commit

Permalink
Fix plugin-types
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-scott committed Feb 1, 2016
1 parent fc527d3 commit e765e0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CSPBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ protected function compileSubgroup($directive, $policies = null)
return $directive." 'none'; ";
}
$ret = $directive.' ';
if ($directive === 'plugin-types') {
// Expects MIME types, not URLs
return $ret . \implode(' ', $policies['allow']);
}
if (!empty($policies['self'])) {
$ret .= "'self' ";
}
Expand Down

0 comments on commit e765e0d

Please sign in to comment.