fix: Return deprecation error when using WebRTC endpoint (#4130)

Fixes #4126.
This commit is contained in:
Kyle Carberry
2022-09-20 09:56:19 -05:00
committed by GitHub
parent 2ca7214259
commit 3618b098cb
2 changed files with 10 additions and 0 deletions

View File

@ -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) {