mirror of
https://github.com/deadcxap/init_scripts.git
synced 2026-07-02 05:43:40 +03:00
docs: add auth portal usage guide
This commit is contained in:
+21
-11
@@ -1,24 +1,34 @@
|
||||
{
|
||||
email dead@cxap.space
|
||||
dns cloudflare {$CF_API_TOKEN}
|
||||
order authorize before reverse_proxy
|
||||
servers {
|
||||
trusted_proxies static private_ranges
|
||||
}
|
||||
}
|
||||
|
||||
# общий сниппет авторизации
|
||||
(tinyauth_forwarder) {
|
||||
forward_auth tinyauth:3000 {
|
||||
uri /api/auth/caddy
|
||||
copy_headers Remote-User Remote-Name Remote-Email Remote-Groups
|
||||
# Портал аутентификации
|
||||
auth.realy.nothing.help {
|
||||
route {
|
||||
authp {
|
||||
backends {
|
||||
local_backend {
|
||||
method local
|
||||
path /data/users.json
|
||||
}
|
||||
}
|
||||
ui {
|
||||
links {
|
||||
"Portainer" "https://port.realy.nothing.help"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# при желании — отдельный сниппет для API
|
||||
(tinyauth_api_forwarder) {
|
||||
forward_auth tinyauth:3000 {
|
||||
uri /api/auth/caddy
|
||||
header_up Authorization {http.request.header.X-Api-Key}
|
||||
header_up Accept application/json
|
||||
# Сниппет для защиты сервисов
|
||||
(auth_portal_forwarder) {
|
||||
authorize {
|
||||
set auth url https://auth.realy.nothing.help
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user