Skip to content

Commit

Permalink
restore request body after reading it
Browse files Browse the repository at this point in the history
  • Loading branch information
kaischwanke committed Sep 21, 2023
1 parent 509997a commit c8f2386
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 c8f2386

Please sign in to comment.