Don't set a playerId cookie it cannot register the player

This commit is contained in:
Deluan
2020-04-04 20:26:36 -04:00
parent 93646b964e
commit 0ba5840a65
3 changed files with 25 additions and 9 deletions
+9 -8
View File
@@ -112,16 +112,17 @@ func getPlayer(players engine.Players) func(next http.Handler) http.Handler {
ctx = context.WithValue(ctx, "transcoding", *trc)
}
r = r.WithContext(ctx)
cookie := &http.Cookie{
Name: playerIDCookieName(userName),
Value: player.ID,
MaxAge: cookieExpiry,
HttpOnly: true,
Path: "/",
}
http.SetCookie(w, cookie)
}
cookie := &http.Cookie{
Name: playerIDCookieName(userName),
Value: player.ID,
MaxAge: cookieExpiry,
HttpOnly: true,
Path: "/",
}
http.SetCookie(w, cookie)
next.ServeHTTP(w, r)
})
}