mirror of
https://github.com/zhaojh329/rttys.git
synced 2026-02-27 09:53:21 +08:00
Add user hook URL support for API access validation
- Forward all original HTTP headers plus custom rttys headers: - X-Rttys-Hook: true - X-Original-Method: original request method - X-Original-URL: original request URL - Hook must return HTTP 200 to allow API access. This enables external services to validate and control user API access by receiving the complete original request context through HTTP hooks. Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
@@ -17,6 +17,14 @@
|
||||
# Return HTTP 200 to indicate that the device is allowed to connect.
|
||||
#dev-hook-url: http://127.0.0.1:8080/rttys-dev-hook
|
||||
|
||||
# This URL will be called when the user accesses APIs if this URL is configured.
|
||||
# Rttys will pass all original headers, along with several additional specific headers:
|
||||
# X-Rttys-Hook: true
|
||||
# X-Original-Method: original request method
|
||||
# X-Original-URL: original request URL
|
||||
# Return HTTP 200 to indicate that the user is allowed to access the API.
|
||||
#user-hook-url: http://127.0.0.1:8080/rttys-user-hook
|
||||
|
||||
# Local access does not require authentication
|
||||
#local-auth: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user