!!!!! DISCONTINUED !!!!! This is now possible directly in Caddy 2.5.1
:80
route {
forward_auth https://sso.firecow.dk {
header_up Host {upstream_hostport}
uri /auth
copy_headers Remote-User Authorization
}
reverse_proxy http://webserver:8080
}
Forward auth middleware for caddyserver
Rougly based on https://doc.traefik.io/traefik/middlewares/http/forwardauth/
:80
route * {
forward_auth https://sso.example.com/auth
reverse_proxy http://webserver:3000
}