From ba57bf4fa2f68fcf82fdf33ab2c31d6786adc637 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 4 May 2021 22:53:59 +0200 Subject: [PATCH] lib: add support for file:// protocol in config file Signed-off-by: Jens Langhammer --- authentik/lib/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/authentik/lib/config.py b/authentik/lib/config.py index 54d86f443..bd143a785 100644 --- a/authentik/lib/config.py +++ b/authentik/lib/config.py @@ -86,6 +86,9 @@ class ConfigLoader: url = urlparse(value) if url.scheme == "env": value = os.getenv(url.netloc, url.query) + if url.scheme == "file": + with open(url.netloc, 'r') as _file: + value = _file.read() return value def update_from_file(self, path: str):