Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieYu4994 committed Jul 21, 2021
1 parent 372f304 commit c6bf2d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ func (h *handler) add(w http.ResponseWriter, r *http.Request) {
h.lock.Unlock()

http.SetCookie(w, &http.Cookie{
Path: "/",
Name: "token_" + key,
Value: key,
MaxAge: exp * 60,
Name: "token_" + key,
SameSite: http.SameSiteNoneMode,
Value: key,
MaxAge: exp * 60,
})
w.WriteHeader(http.StatusOK)
w.Write([]byte(key))
Expand Down

0 comments on commit c6bf2d9

Please # to comment.