Skip to content

Commit

Permalink
Merge pull request #6 from bodhisatan/fix_set_cookie
Browse files Browse the repository at this point in the history
Fix set cookie
  • Loading branch information
bodhisatan authored Jul 27, 2022
2 parents 00768db + d3453c1 commit d3ddd58
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ jobs:
with:
go-version: 1.18

- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: reviewdog-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
reviewdog-${{ runner.os }}-go-
- uses: reviewdog/action-staticcheck@v1
with:
github_token: ${{ secrets.github_token }}
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ jobs:
with:
go-version: 1.18

- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint
run: |
go vet -stdmethods=false $(go list ./...)
Expand Down
3 changes: 0 additions & 3 deletions auth_jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ func (mw *HertzJWTMiddleware) LoginHandler(ctx context.Context, c *app.RequestCo

if mw.CookieSameSite != 0 {
cookie.SetSameSite(protocol.CookieSameSite(mw.CookieSameSite))
c.Response.Header.SetCookie(cookie)
}
cookie.SetKey(mw.CookieName)
cookie.SetValue(tokenString)
Expand All @@ -559,7 +558,6 @@ func (mw *HertzJWTMiddleware) LogoutHandler(ctx context.Context, c *app.RequestC
cookie := &protocol.Cookie{}
if mw.CookieSameSite != 0 {
cookie.SetSameSite(protocol.CookieSameSite(mw.CookieSameSite))
c.Response.Header.SetCookie(cookie)
}
cookie.SetKey(mw.CookieName)
cookie.SetValue("")
Expand Down Expand Up @@ -629,7 +627,6 @@ func (mw *HertzJWTMiddleware) RefreshToken(ctx context.Context, c *app.RequestCo

if mw.CookieSameSite != 0 {
cookie.SetSameSite(protocol.CookieSameSite(mw.CookieSameSite))
c.Response.Header.SetCookie(cookie)
}
cookie.SetKey(mw.CookieName)
cookie.SetValue(tokenString)
Expand Down

0 comments on commit d3ddd58

Please sign in to comment.