This commit is contained in:
nsde 2023-08-29 01:23:00 +02:00
parent c0cff2e709
commit 947b70aae9

View file

@ -47,6 +47,8 @@ async def handle(incoming_request: fastapi.Request):
if not received_key or not received_key.startswith('Bearer '): if not received_key or not received_key.startswith('Bearer '):
return await errors.error(403, 'No NovaAI API key given!', 'Add \'Authorization: Bearer nv-...\' to your request headers.') return await errors.error(403, 'No NovaAI API key given!', 'Add \'Authorization: Bearer nv-...\' to your request headers.')
key_tags = ''
if '#' in received_key: if '#' in received_key:
key_tags = received_key.split('#')[1] key_tags = received_key.split('#')[1]
received_key = received_key.split('#')[0] received_key = received_key.split('#')[0]