We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 624ee10 commit ac5908bCopy full SHA for ac5908b
api/gen_ai/views.py
@@ -2,7 +2,6 @@
2
import logging
3
from hashlib import sha256
4
5
-from django.utils.crypto import constant_time_compare
6
from rest_framework.exceptions import NotFound, PermissionDenied
7
from rest_framework.permissions import AllowAny
8
from rest_framework.response import Response
@@ -30,7 +29,6 @@ def validate_signature(self, request):
30
29
if isinstance(key, str):
31
key = key.encode("utf-8")
32
expected_sig = request.headers.get("HTTP-X-GEN-AI-AUTH-SIGNATURE")
33
- print(request.headers)
34
computed_sig = (
35
"sha256=" + hmac.new(key, request.body, digestmod=sha256).hexdigest()
36
)
0 commit comments