summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2022-10-14 09:11:07 -0500
committerJohn Estabrook <jestabro@vyos.io>2022-10-14 11:30:37 -0500
commit1c429074def533b832ede62fdb138b1201163439 (patch)
tree9db5c8eb66f48d5cb4bd7f067e9da853537d0b47 /src/services
parent427ea592ae8d92d29aca245683832b5bd75b643d (diff)
downloadvyos-1x-1c429074def533b832ede62fdb138b1201163439.tar.gz
vyos-1x-1c429074def533b832ede62fdb138b1201163439.zip
http-api: T4749: transition to config_dict
Diffstat (limited to 'src/services')
-rwxr-xr-xsrc/services/vyos-http-api-server12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server
index 190f3409d..4ace981ca 100755
--- a/src/services/vyos-http-api-server
+++ b/src/services/vyos-http-api-server
@@ -686,10 +686,16 @@ if __name__ == '__main__':
app.state.vyos_keys = server_config['api_keys']
app.state.vyos_debug = server_config['debug']
- app.state.vyos_gql = server_config['gql']
- app.state.vyos_introspection = server_config['introspection']
app.state.vyos_strict = server_config['strict']
- app.state.vyos_origins = server_config.get('cors', {}).get('origins', [])
+ app.state.vyos_origins = server_config.get('cors', {}).get('allow_origin', [])
+ if 'gql' in server_config:
+ app.state.vyos_gql = True
+ if isinstance(server_config['gql'], dict) and 'introspection' in server_config['gql']:
+ app.state.vyos_introspection = True
+ else:
+ app.state.vyos_introspection = False
+ else:
+ app.state.vyos_gql = False
if app.state.vyos_gql:
graphql_init(app)