Skip to content

Commit

Permalink
Document grafana/k6#1489 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov authored and simskij committed Nov 16, 2020
1 parent 24ac891 commit 882aac1
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 882aac1

Please sign in to comment.