From d01fa857b13d0727bbd5dc5efe080e48027b3ad2 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Thu, 16 Nov 2023 00:13:09 -0800 Subject: [PATCH] client/web: allow login client to still run tailscale up I don't believe this has ever worked, since we didn't allow POST requests in the login client. But previously, we were primarily using the legacy client, so it didn't really matter. Now that we've removed the legacy client, we have no way to login. This fixes the login client, allowing it to login, but it still needs to be refactored to expose a dedicated login method, without exposing all the node update functionality. Updates tailscale/corp#14335 Signed-off-by: Will Norris --- client/web/web.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/web/web.go b/client/web/web.go index c4cd78995..3ecde836a 100644 --- a/client/web/web.go +++ b/client/web/web.go @@ -349,6 +349,10 @@ func (s *Server) serveLoginAPI(w http.ResponseWriter, r *http.Request) { // TODO(soniaappasamy): we may want a minimal node data response here s.serveGetNodeData(w, r) return + case httpm.POST: + // TODO(will): refactor to expose only a dedicated login method + s.servePostNodeUpdate(w, r) + return } http.Error(w, "invalid endpoint", http.StatusNotFound) return