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

@@ -74,7 +74,7 @@ paths:
ip:
type: string
description: The IP address to whitelist
example: "203.0.113.10"
example: "1.2.3.4"
ttl_seconds:
type: integer
description: Time-to-live in seconds
@@ -185,6 +185,32 @@ paths:
example: "entry already exists"
'500':
description: Internal error
/api/whitelist/perm/list:
get:
summary: List permanent whitelisted IPs
description: List all currently active permanent whitelisted IPs.
operationId: listTempWhitelist
responses:
'200':
description: List of permanent whitelisted IPs
content:
application/json:
schema:
type: array
items:
type: object
properties:
ip:
type: string
example: "1.2.3.4"
reason:
type: string
example: "my laptop"
'401':
description: Unauthorized — invalid API token
'500':
description: Internal error — database failure
/api/whitelist/perm/{entry}:
delete: