Skip to content

Commit

Permalink
Merge pull request #10 from kaischwanke/main
Browse files Browse the repository at this point in the history
restore request body after reading it
  • Loading branch information
danny-gallagher authored Sep 21, 2023
2 parents 509997a + c8f2386 commit 8a67ea3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions signer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package oauth

import (
"bytes"
"crypto/rsa"
"errors"
"io"
Expand Down Expand Up @@ -49,6 +50,7 @@ func getRequestBody(req *http.Request) ([]byte, error) {
return nil, err
}
defer req.Body.Close()
req.Body = io.NopCloser(bytes.NewReader(bodyBytes))

return bodyBytes, nil
}

0 comments on commit 8a67ea3

Please sign in to comment.