modified: Dockerfile modified: composer.json modified: composer.lock modified: config/packages/twig.yaml modified: config/services.yaml modified: docs/Caddyfile modified: docs/compose.yaml renamed: docs/env.example -> docs/example.env modified: public/index.php modified: readme.md modified: src/Command/GenerateBackupCodesCommand.php modified: src/ConfigBag.php modified: src/Data/Payload.php modified: src/Enum/Scope.php modified: src/Listener/AcceptListener.php modified: src/Listener/AllowListener.php modified: src/Listener/InterceptListener.php modified: src/Listener/LoginListener.php modified: src/MonitorCacheKeys.php modified: src/PersistCache.php modified: src/Service/BackupCodeManager.php modified: src/Service/DomainManager.php new file: src/Service/LoginManager.php modified: src/Trait/CookieNameTrait.php modified: src/Trait/GetTotpTrait.php modified: src/Trait/MakeNonceTrait.php modified: src/Trait/StringTrait.php modified: src/Utilities.php modified: templates/_script.html.twig modified: templates/_style.html.twig modified: templates/base.html.twig modified: templates/login.html.twig
29 lines
763 B
Caddyfile
29 lines
763 B
Caddyfile
# example of securing full service
|
|
# TODO replace domain and service name and port
|
|
service.example.com {
|
|
forward_auth preauth {
|
|
uri {uri}
|
|
copy_headers Remote-User
|
|
}
|
|
reverse_proxy service-container:80
|
|
}
|
|
|
|
# you can choose to only restrict select paths
|
|
# or any other Caddy match criteria, if desired
|
|
# IE: https://protected.example.com/secure/
|
|
protected.example.com {
|
|
# note any request that does not start with "/secure/" is NOT protected
|
|
forward_auth /secure/* preauth {
|
|
uri {uri}
|
|
copy_headers Remote-User
|
|
}
|
|
reverse_proxy protected-service:9000
|
|
}
|
|
|
|
# optionally, if you want to use a subdomain for centeral preauth
|
|
# set SUBDOMAIN_REDIRECT to true
|
|
# and AUTH_SUBDOMAIN to match the subdomain you use here
|
|
auth.example.com {
|
|
reverse_proxy preauth
|
|
}
|