New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Token confusion. #4134
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior, if applicable:
The code is
func (m *OplogMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
body := ""
if r.Method == http.MethodPost {
bf := bytes.NewBuffer(nil)
wt := bufio.NewWriter(bf)
io.Copy(wt, r.Body)
rb, _ := io.ReadAll(bf)
r.Body = io.NopCloser(bytes.NewBuffer(rb))
body = string(rb)
}
}
The token obtained from the header belongs to someone else.
The text was updated successfully, but these errors were encountered: