-
Notifications
You must be signed in to change notification settings - Fork 202
Description
analytics-react-nativeversion: 2.20.4- Integrations versions (if used): @segment/sovran-react-native: 1.1.3
- React Native version: 0.76.7
- iOS or Android or both? both
Steps to reproduce
- Create a config passing a
proxyin a specific URL. Usedhttps://some-proxy-host/endpointas an example in this case.
analytics = createClient({
debug: true,
writeKey: SEGMENT_ANALYTICS_KEY,
proxy: 'https://some-proxy-host/endpoint'
});-
This getURL function adds an extra
/at the end of the URL, changing my proxy URL fromhttps://some-proxy-host/endpointtohttps://some-proxy-host/endpoint/. -
This will cause an issue in a custom HTTP client interceptor logic because, inside that client interceptor, it concatenates
?query_param=value, and because of this change, the URL will become a malformed URL, and we will get a 404 because of the/?inhttps://some-proxy-host/endpoint/?query_param=value -
The version 2.20.4 caused this issue. 2.20.3 does not change that.
Expected behavior
If a proxy URL is passed as https://some-proxy-host/endpoint, I expect the lib not to change that.
Actual behavior
The proxy URL https://some-proxy-host/endpoint is modified by the lib to https://some-proxy-host/endpoint/