You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/secure-connections/sauce-connect-5/faq.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Entering this code -- `(www.)?google-analytics.com,(www.)?googletagmanager.com,(
53
53
54
54
You can access `localhost` through Sauce Connect on Virtual Desktop Browser tests. However, you cannot proxy `localhost` or 127.0.0.1 connections on any Mobile tests, whether they are Emulators, Simulators, or Real Devices.
55
55
56
-
When using Sauce Connect Proxy, local websites running on commonly used ports are available to test at `localhost` or 127.0.0.1 URLs. The exception is when testing on Real or Virtual Mobile Devices. Real and Virtual Mobile tests require changes to the `/etc/hosts` file where Sauce Connect Proxy is hosted. For more information, see [Testing Mobile Devices Against localhost](/secure-connections/sauce-connect-5/guides/configuration/#sc5localhost).
56
+
When using Sauce Connect Proxy, local websites running on commonly used ports are available to test at `localhost` or 127.0.0.1 URLs. The exception is when testing on Real or Virtual Mobile Devices. Real and Virtual Mobile tests require changes to the `/etc/hosts` file where Sauce Connect Proxy is hosted. For more information, see [Testing Mobile Devices Against localhost](/secure-connections/sauce-connect-5/specifications/localhost-ports/#configuring-mobile-devices-for-testing-localhost).
57
57
58
58
For all platforms, tests may perform better when using a locally defined domain name (which can be set in your [`hosts` file](http://en.wikipedia.org/wiki/Hosts_file)) rather than `localhost`. Using a locally defined domain name also allows access to apps on any port. If you are using a parent proxy with Sauce Connect, you may need the [`--proxy-localhost` flag](/dev/cli/sauce-connect-5/run/#proxy-localhost).
# HTTP request and response logging mode. Setting this to none disables logging.
259
-
# The short-url mode logs [scheme://]host[/path] instead of the full URL. The
260
-
# error mode logs request line and headers if status code is greater than or
261
-
# equal to 500.
262
-
#log-http:
353
+
# HTTP request and response logging mode.
354
+
#
355
+
# Modes:
356
+
# - none: no logging
357
+
# - short-url: logs [scheme://]host[/path] instead of the full URL
358
+
# - url: logs the full URL including query parameters
359
+
# - headers: logs request line and headers
360
+
# - body: logs request line, headers, and body
361
+
# - errors: logs request line and headers if status code is greater than or
362
+
# equal to 500
363
+
#
364
+
# Modes for different modules can be specified separated by commas. The
365
+
# following example specifies that the API module logs errors, the proxy module
366
+
# logs headers, and anything else logs full URL.
367
+
#
368
+
# --log-http=api:errors,proxy:headers,url
369
+
#log-http: none
263
370
264
371
# log-level <error|info|debug>
265
372
#
@@ -385,16 +492,6 @@ You can persist Sauce Connect Proxy environment variables by adding them to one
385
492
</TabItem>
386
493
</Tabs>
387
494
388
-
## Configuring Mobile Devices for testing `localhost` {#sc5localhost}
389
-
390
-
Testing with the address `localhost` (or the IP address `127.0.0.1`) is not supported with iOS or Android real devices in Sauce Connect.
391
-
392
-
To work around this, you'll need to edit your `hosts` file on the machine on which you are running Sauce Connect. Add an entry for a placeholder hostname (such as `localtestsite`) and the IP address `127.0.0.1`. Requests for `localtestsite` in your tests will then be sent through your Sauce Connect tunnel to `localhost`, which is the machine on which you are running Sauce Connect.
393
-
394
-
For example, adding `127.0.0.1 mockserver` to your `/etc/hosts` file, then starting a server on `localhost:3333` will route mockserver:3333 HTTP calls to your local server. Mobile tests using Sauce Connect will then be able to find your local server regardless of the nature of your test.
395
-
396
-
For tips on how to edit your `hosts` file, see [How to Edit Hosts File in Linux, Windows, or Mac](https://phoenixnap.com/kb/how-to-edit-hosts-file-in-windows-mac-or-linux).
0 commit comments