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:
db123-test
2026-05-04 11:29:01 +03:30
parent e46077f4fa
commit 7221feb6d4
9 changed files with 104 additions and 25 deletions

View File

@@ -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.