Skip to content

Commit

Permalink
only use the request-uri
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaaaWhatsUpDoc committed Aug 9, 2024
1 parent dc02c87 commit d75fb3e
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 d75fb3e

Please sign in to comment.