Added support for reading auth header from env variable (#1746)

* Added support for reading auth header from env variable

* Check if variable is set, more accurate error description

* Formatting

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
Marc Ole Bulling
2022-01-16 14:46:04 +01:00
committed by GitHub
parent 8ec0d9319b
commit 187654d8b3
2 changed files with 25 additions and 5 deletions

View File

@@ -76,6 +76,8 @@ Setting('AUTH_CLASS', 'Grocy\Middleware\DefaultAuthMiddleware');
// When using ReverseProxyAuthMiddleware,
// the name of the HTTP header which your reverse proxy uses to pass the username (on successful authentication)
Setting('REVERSE_PROXY_AUTH_HEADER', 'REMOTE_USER');
// When using ReverseProxyAuthMiddleware, set to true if the username is passed as environment variable
Setting('REVERSE_PROXY_AUTH_USE_ENV', false);
// LDAP options when using LdapAuthMiddleware
Setting('LDAP_ADDRESS', ''); // Example value "ldap://vm-dc2019.local.berrnd.net"