| 323 | const sockPath = process.env.WDS_SOCKET_PATH || '/ws'; |
| 324 | const isDefaultSockHost = !process.env.WDS_SOCKET_HOST; |
| 325 | function mayProxy(pathname) { |
| 326 | const maybePublicPath = path.resolve( |
| 327 | appPublicFolder, |
| 328 | pathname.replace(new RegExp('^' + servedPathname), '') |
| 329 | ); |
| 330 | const isPublicFileRequest = fs.existsSync(maybePublicPath); |
| 331 | // used by webpackHotDevClient |
| 332 | const isWdsEndpointRequest = |
| 333 | isDefaultSockHost && pathname.startsWith(sockPath); |
| 334 | return !(isPublicFileRequest || isWdsEndpointRequest); |
| 335 | } |
| 336 | |
| 337 | if (!/^http(s)?:\/\//.test(proxy)) { |
| 338 | console.log( |