Can Also read in API Keys from a file
This commit is contained in:
parent
f209e0e452
commit
3270e3fe2c
@ -26,6 +26,10 @@ BUFFER_SIZE = convert_to_bytes(CONFIG['buffer-size'])
|
||||
MAX_SIZE = convert_to_bytes(CONFIG['max-size'])
|
||||
MAX_DATA = convert_to_bytes(CONFIG['max-data'])
|
||||
AUTHORIZED_KEYS = CONFIG['keys']
|
||||
if isinstance(AUTHORIZED_KEYS, str):
|
||||
with open(AUTHORIZED_KEYS) as file:
|
||||
AUTHORIZED_KEYS = list(
|
||||
filter(lambda x: x.strip() != '', file.read().splitlines()))
|
||||
DATABASE = CONFIG['database']
|
||||
|
||||
if not exists(DATABASE):
|
||||
|
Loading…
Reference in New Issue
Block a user