Commit 6cc33d2
Fix iOS inspector getServerHost to handle HTTPS correctly
Summary:
## Summary:
Update `getServerHost()` in `RCTInspectorDevServerHelper` to properly handle
HTTPS connections. When the bundle URL uses HTTPS, the port is omitted from the
host string (the scheme implies 443). The explicit port from the URL takes
priority, followed by the `RCT_METRO_PORT` environment variable, with 8081
as the default fallback for local development.
## Changelog:
[IOS][FIXED] - Fix inspector server host resolution for HTTPS bundle URLs by omitting default port
## Test Plan:
Verified that getServerHost returns:
- `host:port` when an explicit port is in the URL
- `host:envPort` when RCT_METRO_PORT is set
- `host` (no port) when the scheme is https
- `host:8081` as the default fallback
## Facebook:
Applied from nest/mobile/apps/atod-sample/patches/react-native+0.83.1+008+atod-ios-ws-fixes.patch
Reviewed By: cortinico
Differential Revision: D950380041 parent 0596c91 commit 6cc33d2
1 file changed
Lines changed: 18 additions & 14 deletions
Lines changed: 18 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 26 | | |
35 | 27 | | |
36 | 28 | | |
37 | 29 | | |
38 | 30 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
0 commit comments