Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions coderd/httpmw/apikey.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions codersdk/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ func (c *Client) Request(ctx context.Context, method, path string, body interfac
}
req.Header.Set(SessionCustomHeader, c.SessionToken)

// Delete this custom cookie set in November 2022. This is just to remain
// backwards compatible with older versions of Coder.
req.AddCookie(&http.Cookie{
Name: "session_token",
Value: c.SessionToken,
})
Comment on lines -86 to -91
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close enough to November. New clis cannot communicate with <8.15 coderds.


if body != nil {
req.Header.Set("Content-Type", "application/json")
}
Expand Down