Skip to content

Commit fb806d4

Browse files
committed
add note about exposing /health endpoint
1 parent ed0ee30 commit fb806d4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,20 @@ Docker. Build it or check [docker-compose](https://github.com/rhee876527/chiyoga
6060
| DATABASE_PATH | None | For local development use. Conflicts with docker volume paths. |
6161
| DELETE_RETENTION | 90 | Number of days to keep soft-deleted pastes. Valid values: `1-99` |
6262

63+
#### Note about exposing /health to public
64+
Since v1.4.3 this `healthcheck` endpoint was created to actively monitor state of application's database. It has potential for abuse WHEN exposed publicly. Caution is hereby given to protect endpoint (http://localhost:8000/health) from external access as necessary.
65+
66+
If using `Traefik` as reverse proxy this can be done in the `docker-compose` file by adding the following middleware:
67+
```
68+
...
69+
services:
70+
chiyogami:
71+
labels:
72+
- "traefik.http.routers.chiyogami.middlewares=localonly-health"
73+
- "traefik.http.middlewares.localonly-health.replacepathregex.regex=^/health$"
74+
- "traefik.http.middlewares.localonly-health.replacepathregex.replacement=/nonexistent-path"
75+
...
76+
```
6377

6478
## Usage
6579
Web UI is simple & straightforward. Or use the `API`.

0 commit comments

Comments
 (0)