Skip to content

fix: CheckJWT clones the request #89

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

Merged
merged 2 commits into from
May 21, 2021
Merged

fix: CheckJWT clones the request #89

merged 2 commits into from
May 21, 2021

Conversation

jfatta
Copy link

@jfatta jfatta commented Apr 30, 2021

fix #62

I'll keep it as draft until tests are working on v2 branch.

@jfatta jfatta changed the base branch from master to v2 April 30, 2021 18:06
@jfatta jfatta force-pushed the v2-fix-clone-request branch from 2bfab37 to 3e76a58 Compare May 21, 2021 18:49
@jfatta jfatta marked this pull request as ready for review May 21, 2021 18:50
@jfatta jfatta requested a review from a team as a code owner May 21, 2021 18:50
Copy link
Contributor

@grounded042 grounded042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

jwtmiddleware.go Outdated
*r = *r.Clone(context.WithValue(r.Context(), ContextKey{}, validToken))
r = r.Clone(context.WithValue(r.Context(), ContextKey{}, validToken))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, good catch on this

@jfatta jfatta merged commit 23c6193 into v2 May 21, 2021
@jfatta jfatta deleted the v2-fix-clone-request branch May 21, 2021 19:22
sergiught pushed a commit that referenced this pull request Nov 1, 2021
* fix: clone request with ctx

* fix unnecessary pointer
d10i pushed a commit to Hikely/go-jwt-middleware that referenced this pull request Nov 2, 2021
* fix: clone request with ctx

* fix unnecessary pointer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CheckJWT should use net/http.Request.Clone
2 participants