Created
July 4, 2023 09:05
-
-
Save samber/80869a9c1eb83d0993ff73c8fc29a456 to your computer and use it in GitHub Desktop.
hmac cloudflare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# timestamp is ignored, since we use a very large token validity: 1000000000. | |
( | |
lower(http.request.headers["x-screeb-hmac-digest"][0]) eq “hmac-sha256-base64” | |
) | |
and | |
( | |
is_timed_hmac_valid_v0( | |
"secret", | |
http.request.headers["x-screeb-hmac-signature"][0], | |
1000000000, | |
http.request.timestamp.sec, | |
0 | |
) | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment