chore: Deprecate old cookie value (#4336)

Older clis will need to be updated.
Modern clis cannot communicate with <8.15 coderd
This commit is contained in:
Steven Masley
2022-10-03 13:04:22 -04:00
committed by GitHub
parent 4f6355506c
commit 0a95ba62b1
2 changed files with 0 additions and 15 deletions

View File

@ -380,14 +380,6 @@ func apiTokenFromRequest(r *http.Request) string {
return cookie.Value
}
// TODO: @emyrk in October 2022, remove this oldCookie check.
// This is just to support the old cli for 1 release. Then everyone
// must update.
oldCookie, err := r.Cookie("session_token")
if err == nil && oldCookie.Value != "" {
return oldCookie.Value
}
urlValue := r.URL.Query().Get(codersdk.SessionTokenKey)
if urlValue != "" {
return urlValue