Skip to content

Commit 2d131ae

Browse files
committed
Fix csp for dev proxy
1 parent a9d44f2 commit 2d131ae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

webpack/dev-proxy.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ proxy.on('proxyRes', function (proxyRes, req, res, options) {
2424
// allow the webpack sockets and javascript
2525
var post = 'localhost:' + config.webPackPort + ' ';
2626
proxyRes.headers['content-security-policy'] = proxyRes.headers['content-security-policy']
27-
.replace('connect-src ', 'connect-src * ')
28-
.replace('script-src ', 'script-src ' + post);
27+
.replace('style-src ', 'style-src blob: ')
28+
.replace('connect-src ', 'connect-src * blob: ')
29+
.replace('script-src ', 'script-src blob: ' + post);
2930
}
3031
});
3132

0 commit comments

Comments
 (0)