We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70fbd74 commit 0d0168bCopy full SHA for 0d0168b
packages/@vue/cli/lib/ui.js
@@ -6,7 +6,7 @@ function simpleCorsValidation (allowedHost) {
6
return function (req, socket) {
7
const { host, origin } = req.headers
8
// maybe we should just use strict string equal?
9
- const hostRegExp = new RegExp(`^(${host}|${allowedHost}|localhost)(:\\d+)?$`)
+ const hostRegExp = new RegExp(`^https?://(${host}|${allowedHost}|localhost)(:\\d+)?$`)
10
11
if (!origin || !hostRegExp.test(origin)) {
12
socket.destroy()
0 commit comments