docs(api): update webhook configuration and add notification docs

- Simplify webhook headers and body configuration format
- Add documentation for available notification methods and parameters
This commit is contained in:
2026-04-29 10:01:07 +08:00
parent 1432651a14
commit b93c3b0e78
+20 -7
View File
@@ -1619,12 +1619,8 @@ key=ListenAddr
"Notification.Method": "webhook", "Notification.Method": "webhook",
"Webhook.Method": "POST", "Webhook.Method": "POST",
"Webhook.URL": "https://example.com/webhook", "Webhook.URL": "https://example.com/webhook",
"Webhook.Headers": { "Webhook.Headers": "Content-Type: application/json",
"Content-Type": "application/json" "Webhook.Body": "{\"subject\":\"Super-frpc Alert - {{ exceptionType }}\",\"text\":\"Super-frpc Alert\",\"html\":\"{{ serviceName }} - {{ exceptionMsg }}\"}"
},
"Webhook.Body": {
"text": "Super-frpc notification"
}
} }
} }
``` ```
@@ -1769,4 +1765,21 @@ The API implements rate limiting to prevent abuse:
- Login attempts: Maximum 5 attempts per minute per IP - Login attempts: Maximum 5 attempts per minute per IP
- All other endpoints: 100 requests per minute per token - All other endpoints: 100 requests per minute per token
Exceeding rate limits will result in temporary IP or token blocking. Exceeding rate limits will result in temporary IP or token blocking.
---
## Notification
- Available notification methods
| Method | Description |
| :---: | :---: |
| `webhook` | Webhook notification |
- Replacable parameters
| Parameter | Description |
| :---: | :---: |
| `{{ exceptionType }}` | Type of exception that triggered the notification |
| `{{ serviceName }}` | Name of the service that experienced the exception |
| `{{ exceptionMsg }}` | Detailed exception message |