Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
f61cba10
Commit
f61cba10
authored
7 years ago
by
Buns Shar
Committed by
Joe Haddad
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Ensure proxy url starts with `
http://`
or `
https://`
(#1890)
parent
cb41a76e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-scripts/scripts/utils/addWebpackMiddleware.js
+8
-0
packages/react-scripts/scripts/utils/addWebpackMiddleware.js
with
8 additions
and
0 deletions
+8
-0
packages/react-scripts/scripts/utils/addWebpackMiddleware.js
+
8
-
0
View file @
f61cba10
...
@@ -89,6 +89,14 @@ module.exports = function addWebpackMiddleware(devServer) {
...
@@ -89,6 +89,14 @@ module.exports = function addWebpackMiddleware(devServer) {
)
)
);
);
process
.
exit
(
1
);
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.
// Otherwise, if proxy is specified, we will let it handle any request.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets