Commit f61cba10 authored by Buns Shar's avatar Buns Shar Committed by Joe Haddad
Browse files

Ensure proxy url starts with `http://` or `https://` (#1890)

parent cb41a76e
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 8 additions and 0 deletions
+8 -0
......@@ -89,6 +89,14 @@ module.exports = function addWebpackMiddleware(devServer) {
)
);
process.exit(1);
// Test that proxy url specified starts with http:// or https://
} else if (!/^http(s)?:\/\//.test(proxy)) {
console.log(
chalk.red(
'When "proxy" is specified in package.json it must start with either http:// or https://'
)
);
process.exit(1);
}
// Otherwise, if proxy is specified, we will let it handle any request.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment