summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-11-30 15:19:16 +0000
committerGitHub <noreply@github.com>2023-11-30 15:19:16 +0000
commitfc76d8f783486c7491afa92a9846a6db353e866c (patch)
treed53924c75daa2244e4a3fa029f1413f0daff2660
parent50a78a29e3bbe6ccc2e070706133c06f6053a612 (diff)
parentad72670a1f7410a3c4a7e2021f0b7511156f5850 (diff)
downloadvyos-1x-fc76d8f783486c7491afa92a9846a6db353e866c.tar.gz
vyos-1x-fc76d8f783486c7491afa92a9846a6db353e866c.zip
Merge pull request #2553 from dmbaturin/T5772
https: T5772: remove the default API key
-rw-r--r--python/vyos/defaults.py2
-rwxr-xr-xsrc/conf_mode/http-api.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/defaults.py b/python/vyos/defaults.py
index bddbc08c9..59a001ec7 100644
--- a/python/vyos/defaults.py
+++ b/python/vyos/defaults.py
@@ -50,7 +50,7 @@ api_data = {
'strict' : False,
'gql' : False,
'debug' : False,
- 'api_keys' : [ {"id": "testapp", "key": "qwerty"} ]
+ 'api_keys' : [ ]
}
vyos_cert_data = {
diff --git a/src/conf_mode/http-api.py b/src/conf_mode/http-api.py
index 00f3d4f7f..2ade3476d 100755
--- a/src/conf_mode/http-api.py
+++ b/src/conf_mode/http-api.py
@@ -39,7 +39,7 @@ vyos_conf_scripts_dir=vyos.defaults.directories['conf_mode']
def get_config(config=None):
http_api = deepcopy(vyos.defaults.api_data)
x = http_api.get('api_keys')
- if x is None:
+ if not x:
default_key = None
else:
default_key = x[0]