We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
http://
https://
1 parent 3d8c820 commit 10dfd89Copy full SHA for 10dfd89
packages/react-scripts/scripts/start.js
@@ -188,6 +188,14 @@ function addMiddleware(devServer) {
188
console.log(chalk.red('Instead, the type of "proxy" was "' + typeof proxy + '".'));
189
console.log(chalk.red('Either remove "proxy" from package.json, or make it a string.'));
190
process.exit(1);
191
+ // Test that proxy url specified starts with http:// or https://
192
+ } else if (!/^http(s)?:\/\//.test(proxy)) {
193
+ console.log(
194
+ chalk.red(
195
+ 'When "proxy" is specified in package.json it must start with either http:// or https://'
196
+ )
197
+ );
198
+ process.exit(1);
199
}
200
201
// Otherwise, if proxy is specified, we will let it handle any request.
0 commit comments