Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document loadimpact/k6#1489 #113

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/data/markdown/docs/01 guides/02 Using k6/05 Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ An object with overrides to DNS resolution, similar to what you can do with `/et
Linux/Unix or `C:\\Windows\\System32\\drivers\\etc\\hosts` on Windows. For instance, you could set
up an override which routes all requests for `test.k6.io` to `1.2.3.4`.

From v0.28.0 it is also supported to redirect only from certain ports and/or to certain ports.

> #### ⚠️ Keep in mind!
>
> This does not modify the actual HTTP `Host` header, but rather where it will be routed.
Expand All @@ -353,12 +355,16 @@ up an override which routes all requests for `test.k6.io` to `1.2.3.4`.
export let options = {
hosts: {
'test.k6.io': '1.2.3.4',
'test.k6.io:443': '1.2.3.4:8443',
},
};
```

</div>

With the above code any request made to `test.k6.io` will be redirected to `1.2.3.4` without changing
it port unless it's port is `443` which will be redirected to port `8443`.

### HTTP Debug

Log all HTTP requests and responses. Excludes body by default, to include body use
Expand Down