include method and request uri in the generated fingerprint + idempotency key

This commit is contained in:
kim 2024-08-09 13:15:34 +01:00
parent dc02c87e2d
commit f3e68e91ba

View file

@ -84,7 +84,10 @@ func Idempotency() gin.HandlerFunc {
// NOTE: using the auth header is only an option
// because we ONLY support bearer oauth tokens.
key = c.Request.Header.Get("Authorization") +
c.Request.UserAgent() + key
c.Request.UserAgent() +
c.Request.Method +
c.Request.URL.RequestURI() +
key
// Look for stored response.
code, _ := responses.Get(key)