Skip to content

Commit

Permalink
docs(readme): explain behavior of unset auth_tokens and `delete_tok…
Browse files Browse the repository at this point in the history
…ens` (#202)

* doc(readme): explain behavior of unset `auth_tokens` & `delete_tokens`

Just a clarification on how this works in the case of uninstalled tokens, for greater clarity and security

* docs(readme): update styling

* docs(readme): update grammar

---------

Co-authored-by: Orhun Parmaksız <[email protected]>
  • Loading branch information
DDtKey and orhun authored Dec 11, 2023
1 parent c5c9c6d commit b74e9ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ Set `delete_tokens` array in [config.toml](./config.toml) to activate the [`DELE
$ curl -H "Authorization: <auth_token>" -X DELETE "<server_address>/file.txt"
```

> The `DELETE` endpoint will not be exposed and will return `404` error if `delete_tokens` are not set.
### Server

To start the server:
Expand All @@ -275,6 +277,10 @@ $ rustypaste

You can also set multiple auth tokens via the array field `[server].auth_tokens` in your `config.toml`.

> If neither `AUTH_TOKEN` nor `[server].auth_tokens` are set, the server will not require any authentication.
>
> Exception is the `DELETE` endpoint, which requires at least one token to be set. See [deleting files from server](#delete-file-from-server) for more information.
See [config.toml](./config.toml) for configuration options.

#### List endpoint
Expand Down

0 comments on commit b74e9ce

Please sign in to comment.