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

@@ -14,8 +14,7 @@ import (
)
var (
addr = flag.String("addr", "localhost:8060", "address of Tailscale web client")
devMode = flag.Bool("dev", false, "run web client in dev mode")
addr = flag.String("addr", "localhost:8060", "address of Tailscale web client")
)
func main() {
@@ -32,7 +31,6 @@ func main() {
// Serve the Tailscale web client.
ws, err := web.NewServer(web.ServerOpts{
Mode: web.LegacyServerMode,
DevMode: *devMode,
LocalClient: lc,
})
if err != nil {