We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af47708 commit d2e4ea2Copy full SHA for d2e4ea2
README.md
@@ -146,8 +146,10 @@ local_response = LocalResponse(request.body())
146
# local_response = LocalResponse("path/to/my/file.ext")
147
148
# Optional: verify the HMAC signature
149
-if not local_response.is_valid_hmac_signature(my_secret_key, "some signature"):
150
- raise Error("Invalid HMAC signature!")
+# You'll need to get the "X-Mindee-Hmac-Signature" custom HTTP header.
+hmac_signature = request.headers.get("X-Mindee-Hmac-Signature")
151
+if not local_response.is_valid_hmac_signature(my_secret_key, hmac_signature):
152
+ raise Error("Bad HMAC signature! Is someone trying to do evil?")
153
154
# Deserialize the response
155
0 commit comments