36 lines
No EOL
638 B
Text
36 lines
No EOL
638 B
Text
(rp_skip_tls) {
|
|
reverse_proxy {args[0]} {
|
|
transport http {
|
|
tls_insecure_skip_verify
|
|
}
|
|
}
|
|
}
|
|
(rp) {
|
|
reverse_proxy {args[0]}
|
|
}
|
|
(auth_path) {
|
|
handle /oauth2/* {
|
|
reverse_proxy oauth2proxy:4180 {
|
|
header_up X-Real-IP {remote_host}
|
|
header_up X-Forwarded-Uri {uri}
|
|
}
|
|
}
|
|
}
|
|
(auth_redirect) {
|
|
import auth_path
|
|
handle {
|
|
forward_auth oauth2proxy:4180 {
|
|
uri /oauth2/auth
|
|
header_up X-Real-IP {remote_host}
|
|
@error status 401
|
|
handle_response @error {
|
|
redir * /oauth2/sign_in?rd={scheme}://{host}{uri}
|
|
}
|
|
}
|
|
}
|
|
import {args[0]} {args[1]}
|
|
}
|
|
(protect) {
|
|
import auth_path
|
|
import auth_redirect {args[0]} {args[1]}
|
|
} |