mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user