diff options
author | Daniil Baturin <daniil@vyos.io> | 2023-12-20 20:08:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-20 20:08:18 +0000 |
commit | 79879e797cef81ff96ee535da90b8c0d2350594e (patch) | |
tree | 91eedec3bf573de0374081b98186fd2b74ab5af0 /src/services | |
parent | 316a930b8c54155a45e92796ad2ab69283aa1eb0 (diff) | |
parent | fdf8011559b2ee6208155876c554bac77f5693c7 (diff) | |
download | vyos-1x-79879e797cef81ff96ee535da90b8c0d2350594e.tar.gz vyos-1x-79879e797cef81ff96ee535da90b8c0d2350594e.zip |
Merge pull request #2662 from vyos/mergify/bp/sagitta/pr-2661
Allow the HTTPS API server to start without any configured keys when GraphQL JWT auth is configured (backport #2661)
Diffstat (limited to 'src/services')
-rwxr-xr-x | src/services/vyos-http-api-server | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index bfd50cc80..b64e58132 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -872,13 +872,15 @@ def initialization(session: ConfigSession, app: FastAPI = app): global server try: server_config = load_server_config() - keys = flatten_keys(server_config) except Exception as e: logger.critical(f'Failed to load the HTTP API server config: {e}') sys.exit(1) app.state.vyos_session = session - app.state.vyos_keys = keys + app.state.vyos_keys = [] + + if 'keys' in server_config: + app.state.vyos_keys = flatten_keys(server_config) app.state.vyos_debug = bool('debug' in server_config) app.state.vyos_strict = bool('strict' in server_config) |