Use auth key name if there are no app id in in headers or in extra_data

This commit is contained in:
Ido Lavi 2025-11-19 16:59:38 +02:00
parent b92cc2b2f9
commit 1557e2d4ce

View file

@ -799,7 +799,7 @@ class NomaGuardrail(CustomGuardrail):
or request_data.get("metadata", {})
.get("headers", {})
.get("x-noma-application-id")
or self.application_id,
or (user_auth.key_name if user_auth.key_name else self.application_id),
"ipAddress": request_data.get("metadata", {}).get(
"requester_ip_address", None
),