From 947b70aae97e3e9b803e28728bee78139f577fa1 Mon Sep 17 00:00:00 2001 From: nsde Date: Tue, 29 Aug 2023 01:23:00 +0200 Subject: [PATCH] Fix --- api/handler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/handler.py b/api/handler.py index 268a75d..e370ba5 100644 --- a/api/handler.py +++ b/api/handler.py @@ -47,6 +47,8 @@ async def handle(incoming_request: fastapi.Request): 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.') + key_tags = '' + if '#' in received_key: key_tags = received_key.split('#')[1] received_key = received_key.split('#')[0]