mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 12:39:27 +00:00
69400be4fc
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47685 Currently, we assume any URL with a hostname of `10.0.2.2` or `10.0.3.2` (device-relative) is eligible for rewriting to `localhost` (frontend-relative), because we assume the device is an Android emulator. We rewrite these URLs between device and dev machine so that the rewritten URLs are reachable from the dev machine. This diff narrows this logic so that we'll only rewrite URLs where the hostname matches the pre-existing list *and* this matches the host the device is actually connected on, according to its headers from the original connection. The main motivation for this change is to unblock removing assumptions about device-reachable vs server-reachable hosts. Later in the stack we'll drop the hardcoded listing of `10.0.2.2` etc in favour of identifying URLs that target the dev server, from whatever network. There's also an edge case fix here that `10.0.2.2` etc might actually refer to a remote LAN server, and not be an Android emulator's alias for for an emulator host. Changelog: [General][Fixed] RN DevTools: Don't assume 10.0.2.2 is an alias for localhost unless it's used to establish a connection to the server Reviewed By: huntie Differential Revision: D66058704 fbshipit-source-id: bad28717b0c9b1ca43e2ea3391cef13f87892e6c |
||
---|---|---|
.. | ||
assets | ||
babel-plugin-codegen | ||
community-cli-plugin | ||
core-cli-utils | ||
debugger-frontend | ||
dev-middleware | ||
eslint-config-react-native | ||
eslint-plugin-react-native | ||
eslint-plugin-specs | ||
gradle-plugin | ||
helloworld | ||
hermes-inspector-msggen | ||
metro-config | ||
normalize-color | ||
polyfills | ||
react-native | ||
react-native-babel-preset | ||
react-native-babel-transformer | ||
react-native-bots | ||
react-native-codegen | ||
react-native-codegen-typescript-test | ||
react-native-info | ||
react-native-popup-menu-android | ||
react-native-test-library | ||
react-native-test-renderer | ||
rn-tester | ||
typescript-config | ||
virtualized-lists |