Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ The [Signal CLI REST API](https://github.com/bbernhard/signal-cli-rest-api) prov

It's designed for developers who want to:

- **Restrict** or **log** certain API calls,
- Enforce **authentication**,
- Add **templating** or **request preprocessing**,
- And deploy everything neatly via **Docker**.
- **Restrict** or **log** certain API calls
- Enforce **authentication**
- Add **templating** or **request preprocessing**
- And deploy everything neatly via **Docker**

## Key Features

Expand Down
7 changes: 5 additions & 2 deletions docs/configuration/examples/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Example Config (all configurations shown)
service:
logLevel: info
port: 8880
hostnames:
- mydomain.com
Expand All @@ -8,8 +9,6 @@ api:
url: http://signal-api:8080
tokens: [token1, token2]

logLevel: info

settings:
message:
template: |
Expand Down Expand Up @@ -41,5 +40,9 @@ settings:
- "!/v1/about"
- /v2/send

rateLimiting:
limit: 100
period: 1h

fieldPolicies:
"@number": { value: "+123400003", action: block }
23 changes: 23 additions & 0 deletions docs/configuration/ratelimiting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Rate Limiting
---

# Rate Limiting

Rate limiting is used to control how many requests or actions a token or client can perform within a given period.
This helps prevent abuse, protect downstream services, and ensure fair usage.

Rate limits can be defined in `settings.access.rateLimiting`:

```yaml
settings:
access:
rateLimiting:
limit: 100
period: 1m
```

- `limit`: The maximum number of allowed requests in the given period
- `period`: The duration over which the limit is measured (supports Go duration format like `1m`, `10s`, `1h`)

When a request exceeds the configured rate limit the server responds with `429` `Too Many Requests`.
5 changes: 5 additions & 0 deletions docs/features/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ This is really helpful when trying to block certain numbers from using certain t

Find more about this feature [here](./configuration/field-policies).

## Rate Limiting

**Rate Limiting** is used for limiting requests and to stop server overload, because of DDoS attacks, malconfigured clients, or malicious actors.
It ensures fair usage per token by controlling how many requests can be processed within a defined period.

## Endpoints

> _Block unwanted access_
Expand Down