Caddy 2 plugin for integration with Authelia
This plugin is still a work in progress. Use it in production at your own risk
The following is an example of using the plugin inside a Caddyfile:
whoami.example.com {
route {
# Authelia URL : internal URL preferred
authelia http://authelia:9091 {
# redirect_url: optional
# Public auth URL, used when not authenticated on whoami.example.com
redirect_url authelia.example.com
}
request_header Remote-User {http.auth.user.id}
request_header Remote-Groups {http.auth.user.groups}
reverse_proxy http://whoami
}
}
authelia.example.com {
# Needed for 2FA to work - authelia checks X-Forwarded-Host, and Caddy doesn't fill it by default
request_header X-Forwarded-Host {http.request.host}
reverse_proxy http://authelia:9091
}
This project is available under the Mozilla Public License 2.0 (MPL), excepted where otherwise explicitly noted.
Copyright (c) 2020 Vítor Vasconcellos. All rights reserved.
I am not affiliated with Caddy or Authelia.
Caddy® is a registered trademark of Light Code Labs, LLC.