feat: add permanent whitelist list endpoint and rename DB table
- Add GET /api/whitelist/perm/list to list permanent whitelisted entries - Implement permWhitelistListHandler with API key verification - Rename permanent_whitelist table to perm_whitelist for consistency - Update default DB path from ./data to /data - Comment out build job in CI/CD workflow
This commit is contained in:
17
docs/api.md
17
docs/api.md
@@ -80,6 +80,23 @@ curl -X POST http://127.0.0.1:8080/api/whitelist/perm \
|
||||
-d '{"entry":"203.0.113.10"}'
|
||||
```
|
||||
|
||||
### GET /api/whitelist/perm/list
|
||||
|
||||
List all currently active permanent whitelisted IPs.
|
||||
|
||||
**Authorization:** Bearer `{API_TOKEN}`
|
||||
|
||||
**Response body:**
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"ip": "1.2.3.4",
|
||||
"reason": "my laptop",
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### DELETE /api/whitelist/perm/{entry}
|
||||
|
||||
Remove a permanent whitelisted IP or CIDR range.
|
||||
|
||||
Reference in New Issue
Block a user