Skip to content

Commit 626a35a

Browse files
committed
remove security risk
This is a breaking change but will be release on patch level because it's a security issue. To fix the breaking change add this to the middleware options: ``` js { headers: { "Access-Control-Allow-Origin": "your-host-name" } } ```
1 parent 798b2f1 commit 626a35a

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

middleware.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ module.exports = function(compiler, options) {
6161
// server content
6262
var content = context.fs.readFileSync(filename);
6363
content = shared.handleRangeHeaders(content, req, res);
64-
res.setHeader("Access-Control-Allow-Origin", "*"); // To support XHR, etc.
6564
res.setHeader("Content-Type", mime.lookup(filename) + "; charset=UTF-8");
6665
res.setHeader("Content-Length", content.length);
6766
if(context.options.headers) {

0 commit comments

Comments
 (0)