If a network proxy is required a configuration builder can be provided when initializing the SDK. Network proxies may be required if end users generate sessions on devices that have proxy requirements. To configure, set your proxy parameters when initializing the SDK.
These proxy configurations apply to proxies that accept HTTP CONNECT requests to create a tunnel to the destination server. If you have set up a proxy following our guide to proxy traffic through your own domain, you should instead provide your proxy URL as the
serverURLduring initialization.LogRocket.init(..., options -> { // ... other options options.setServerURL("https://example.com/i"); }SDK.init(..., options -> { // ... other options options.setServerURL("https://example.com/i"); }
LogRocket.init(..., options -> {
// ... other options
options.setProxyHost("10.0.2.2");
options.setProxyPort(8888);
// For proxies that need an Authorization header:
options.setProxyHeaderName("Proxy-Authorization");
options.setProxyHeaderValue("Basic authorizationKey");
});SDK.init(..., options -> {
// ... other options
options.setProxyHost("10.0.2.2");
options.setProxyPort(8888);
// For proxies that need an Authorization header:
options.setProxyHeaderName("Proxy-Authorization");
options.setProxyHeaderValue("Basic authorizationKey");
});