mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
fix: Return deprecation error when using WebRTC endpoint (#4130)
Fixes #4126.
This commit is contained in:
@ -430,6 +430,14 @@ func New(options *Options) *API {
|
||||
r.Get("/pty", api.workspaceAgentPTY)
|
||||
r.Get("/connection", api.workspaceAgentConnection)
|
||||
r.Get("/coordinate", api.workspaceAgentClientCoordinate)
|
||||
// TODO: This can be removed in October. It allows for a friendly
|
||||
// error message when transitioning from WebRTC to Tailscale. See:
|
||||
// https://github.com/coder/coder/issues/4126
|
||||
r.Get("/dial", func(w http.ResponseWriter, r *http.Request) {
|
||||
httpapi.Write(w, http.StatusGone, codersdk.Response{
|
||||
Message: "Your Coder CLI is out of date, and requires v0.8.15+ to connect!",
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
r.Route("/workspaceresources/{workspaceresource}", func(r chi.Router) {
|
||||
|
@ -44,6 +44,8 @@ func AGPLRoutes(a *AuthTester) (map[string]string, map[string]RouteCheck) {
|
||||
"POST:/api/v2/users/login": {NoAuthorize: true},
|
||||
"GET:/api/v2/users/authmethods": {NoAuthorize: true},
|
||||
"POST:/api/v2/csp/reports": {NoAuthorize: true},
|
||||
// This is a dummy endpoint for compatibility.
|
||||
"GET:/api/v2/workspaceagents/{workspaceagent}/dial": {NoAuthorize: true},
|
||||
|
||||
// Has it's own auth
|
||||
"GET:/api/v2/users/oauth2/github/callback": {NoAuthorize: true},
|
||||
|
Reference in New Issue
Block a user