Skip to content

Commit

Permalink
[#182] - fixed the csp matching an incorrect sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
timkim committed Nov 14, 2016
1 parent 137ac11 commit faa0dbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/injector-transform.js
Expand Up @@ -37,7 +37,7 @@ module.exports = function(options) {
InjectHTML.prototype._transform = function (chunk, encoding, callback) {
// Inject our scripts at the bottom of the body tag
var newChunk = chunk.toString().replace(replaceText, replaceText + injectScript + '\n');
var cspRegex = /<meta.+Content-Security-Policy.+content.+"(.+)".*>/i;
var cspRegex = /<meta.+Content-Security-Policy.+content.+"(.+)".*[^-]>/i;
var cspObject, cspString, cspTag;

// if we find an existing csp - warn the user about their csp being modified
Expand Down

0 comments on commit faa0dbd

Please sign in to comment.