client/web: fill devMode from an env var

Avoids the need to pipe a web client dev flag through the tailscaled
command.

Updates tailscale/corp#14335

Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
Sonia Appasamy
2023-11-02 18:19:16 -04:00
committed by Sonia Appasamy
parent f0bc95a066
commit 0ecfc1d5c3
4 changed files with 8 additions and 16 deletions

View File

@@ -52,8 +52,7 @@ func (b *LocalBackend) WebClientInit() (err error) {
b.logf("WebClientInit: initializing web ui")
if b.webClient.server, err = web.NewServer(web.ServerOpts{
Mode: web.ManageServerMode,
// TODO(sonia): allow passing back dev mode flag
Mode: web.ManageServerMode,
LocalClient: b.webClient.lc,
Logf: b.logf,
}); err != nil {
@@ -75,8 +74,8 @@ func (b *LocalBackend) WebClientShutdown() {
b.mu.Unlock() // release lock before shutdown
if server != nil {
server.Shutdown()
b.logf("WebClientShutdown: shut down web ui")
}
b.logf("WebClientShutdown: shut down web ui")
}
// handleWebClientConn serves web client requests.