about summary refs log tree commit diff
path: root/gn3/api/llm.py
diff options
context:
space:
mode:
authorAlexander_Kabui2025-06-26 15:58:01 +0300
committerBonfaceKilz2025-07-07 07:56:57 +0300
commitdc1412bd61932f3b5b61b7b2639aaf2577643d33 (patch)
tree2d122089fd3b71e6f3db2487e3da2f7a52c4d623 /gn3/api/llm.py
parent275e06e5248f291f069a5099282abc0c0fcafdaf (diff)
downloadgenenetwork3-dc1412bd61932f3b5b61b7b2639aaf2577643d33.tar.gz
feat: Add check for anonymous metadata.
Diffstat (limited to 'gn3/api/llm.py')
-rw-r--r--gn3/api/llm.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/gn3/api/llm.py b/gn3/api/llm.py
index a127eb7..e654188 100644
--- a/gn3/api/llm.py
+++ b/gn3/api/llm.py
@@ -66,11 +66,12 @@ def clean_query(query:str) -> str:
 
 def is_verified_anonymous_user(request):
     """This function should verify autheniticity of metadate from gn2 """
-    anony_id = request.headers.get("anonymous_id") #should verify this + metadata signature
-    user_status = request.headers.get("anonymous_status", "")
-    _user_signed_metadata = request.headers.get("anony_metadata", "") # verify this for integrity
+    anony_id = request.headers.get("Anonymous-Id") #should verify this + metadata signature
+    user_status = request.headers.get("Anonymous-Status", "")
+    _user_signed_metadata = request.headers.get("Anony-Metadata", "") # verify this for integrity
     return bool(anony_id) and user_status.lower() == "verified"
 
+
 def with_gnqna_fallback(view_func):
     """Allow fallback to GNQNA user if token auth fails."""
     @wraps(view_func)