mirror of
https://github.com/go-shiori/shiori.git
synced 2024-11-10 17:36:02 +08:00
use UTC for cookie expiry date in backend (#566)
This commit is contained in:
parent
257506ae19
commit
52d9a6322f
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ func (h *handler) apiLogin(w http.ResponseWriter, r *http.Request, ps httprouter
|
||||||
Session string `json:"session"`
|
Session string `json:"session"`
|
||||||
Account model.Account `json:"account"`
|
Account model.Account `json:"account"`
|
||||||
Expires string `json:"expires"`
|
Expires string `json:"expires"`
|
||||||
}{strSessionID, account, time.Now().Add(expTime).Format(time.RFC1123)}
|
}{strSessionID, account, time.Now().UTC().Add(expTime).Format(time.RFC1123)}
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
err = json.NewEncoder(w).Encode(&loginResult)
|
err = json.NewEncoder(w).Encode(&loginResult)
|
||||||
|
|
Loading…
Reference in a new issue