Skip to content

Commit

Permalink
include method and request uri in the generated fingerprint + idempot…
Browse files Browse the repository at this point in the history
…ency key
  • Loading branch information
NyaaaWhatsUpDoc committed Aug 9, 2024
1 parent dc02c87 commit f3e68e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/middleware/idempotency.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f3e68e9

Please sign in to comment.