client/web: remove DebugMode from GET /api/data

No longer using this! Readonly state fully managed via auth endpoint.
Also getting rid of old Legacy server mode.

A #cleanup

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
Sonia Appasamy
2023-11-15 16:50:03 -05:00
committed by Sonia Appasamy
parent 6f7a1b51a8
commit 2dbd546766
4 changed files with 3 additions and 20 deletions

View File

@@ -90,12 +90,10 @@ func runWeb(ctx context.Context, args []string) error {
selfIP = st.Self.TailscaleIPs[0]
}
cliServerMode := web.LegacyServerMode
var existingWebClient bool
if prefs, err := localClient.GetPrefs(ctx); err == nil {
existingWebClient = prefs.RunWebClient
}
cliServerMode = web.LoginServerMode
if !existingWebClient {
// Also start full client in tailscaled.
log.Printf("starting tailscaled web client at %s:%d\n", selfIP.String(), web.ListenPort)
@@ -105,7 +103,7 @@ func runWeb(ctx context.Context, args []string) error {
}
webServer, err := web.NewServer(web.ServerOpts{
Mode: cliServerMode,
Mode: web.LoginServerMode,
CGIMode: webArgs.cgi,
PathPrefix: webArgs.prefix,
LocalClient: &localClient,