feat: provide healthcheck API (#474)

This commit is contained in:
sigoden
2024-10-28 07:37:21 +08:00
committed by GitHub
parent 881a67e1a4
commit d445b78f96
3 changed files with 49 additions and 3 deletions

View File

@@ -216,8 +216,14 @@ dd skip=$upload_offset if=file status=none ibs=1 | \
curl -X PATCH -H "X-Update-Range: append" --data-binary @- http://127.0.0.1:5000/file
```
Health checks
```sh
curl http://127.0.0.1:5000/__dufs__/health
```
<details>
<summary><h2>Advanced topics</h2></summary>
<summary><h2>Advanced Topics</h2></summary>
### Access Control
@@ -395,6 +401,8 @@ Dufs allows users to customize the UI with your own assets.
dufs --assets my-assets-dir/
```
> If you only need to make slight adjustments to the current UI, you copy dufs's [assets](https://github.com/sigoden/dufs/tree/main/assets) directory and modify it accordingly. The current UI doesn't use any frameworks, just plain HTML/JS/CSS. As long as you have some basic knowledge of web development, it shouldn't be difficult to modify.
Your assets folder must contains a `index.html` file.
`index.html` can use the following placeholder variables to retrieve internal data.