mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
850e550422
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39456 **Fixes new debugger launch flow on Android:** D49158227 aimed to improve proxy-safe behaviour for remote dev servers by auto-detecting the appropriate server URL for clients using the `Host` header (etc) from the HTTP request. However, this approach broke the local case for Android emulators and externally connected devices since they would originate from a device-relative server hostname — e.g. `10.0.2.2` for the stock Android emulator. https://pxl.cl/3mVmR This commit reverts to an explicit approach where callers specify the base URL to the dev server that should be addressible from the development machine — now as a single `serverBaseUrl` option. **Changes** - Adds new `serverBaseUrl` option to `createDevMiddleware`, designed to be the base URL value for constructing dev server URLs returned in endpoints such as `/json/list`. - This changes little for the `localhost` case (now enabling `https://` URLs), but enables remote dev server setups to specify this cleanly. - Updates call site in `community-cli-plugin`. Changelog: [Internal] Reviewed By: robhogan Differential Revision: D49276125 fbshipit-source-id: 2b6a8507073649832993971aa9d0870f54c9bd44