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

Add correct language for --rest-api-host-allowlist #610

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 2 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
21 changes: 11 additions & 10 deletions docs/reference/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2745,7 +2745,7 @@
### `rest-api-host-allowlist`

<Tabs>
<TabItem value="Syntax" label="Syntax" default>
<TabItem value="Syntax" label="Syntax" default>

```bash
--rest-api-host-allowlist=<hostname>[,<hostname>...]... or "*"
Expand All @@ -2755,32 +2755,33 @@
<TabItem value="Example" label="Example" >

```bash
--rest-api-host-allowlist=medomain.com,meotherdomain.com
--rest-api-host-allowlist=localhost,127.0.0.1,192.168.1.3
```

Check failure on line 2759 in docs/reference/cli/index.md

View workflow job for this annotation

GitHub Actions / Lint

Fenced code blocks should be surrounded by blank lines

docs/reference/cli/index.md:2759 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md031.md

</TabItem>
<TabItem value="Environment variable" label="Environment variable" >

```bash
TEKU_REST_API_HOST_ALLOWLIST=medomain.com,meotherdomain.com
TEKU_REST_API_HOST_ALLOWLIST=localhost,127.0.0.1,192.168.1.3
```

Check failure on line 2765 in docs/reference/cli/index.md

View workflow job for this annotation

GitHub Actions / Lint

Fenced code blocks should be surrounded by blank lines

docs/reference/cli/index.md:2765 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md031.md

</TabItem>
<TabItem value="Configuration file" label="Configuration file" >

```bash
rest-api-host-allowlist: ["medomain.com", "meotherdomain.com"]
rest-api-host-allowlist: ["localhost", "127.0.0.1", "192.168.1.3"]
```

Check failure on line 2771 in docs/reference/cli/index.md

View workflow job for this annotation

GitHub Actions / Lint

Fenced code blocks should be surrounded by blank lines

docs/reference/cli/index.md:2771 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md031.md

</TabItem>
</Tabs>

A comma-separated list of hostnames to allow access to the REST API.
By default, Teku accepts access from `localhost` and `127.0.0.1`.
A comma-separated list of hostnames or IP addresses from which the REST API server will respond. This flag restricts the server's responding addresses, but not the client access.

You can listen on all addresses using `--rest-api-listen-address="*"` but restrict responses to specific hosts with this flag.
joaniefromtheblock marked this conversation as resolved.
Show resolved Hide resolved

By default, Teku's REST API server responds only to requests where the Host header matches `localhost` or `127.0.0.1`.
If you specify values, the server will only respond to requests where the Host header matches one of the specified hosts or IP addresses.

:::warning

Only trusted parties should access the REST API.
Only trusted parties should access the REST API`
Do not directly expose these APIs publicly on production nodes.

We don't recommend allowing all hostnames (`"*"`) for production environments.
Expand Down
Loading