Skip to content

Commit

Permalink
feat: hint tsnet to make a login
Browse files Browse the repository at this point in the history
If I don't set this var, I get the message "Authkey is set; but state
is NoState. Ignoring authkey. Re-run with TSNET_FORCE_LOGIN=1 to
force use of authkey."
The thing to note here is the program runs fine even in the
absence of this var.
  • Loading branch information
ajitid committed Aug 6, 2024
1 parent 5573417 commit a0ea9e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"io"
"log"
"net/http"
"os"

"github.com/r3labs/sse/v2"
"tailscale.com/tsnet"
Expand Down Expand Up @@ -107,6 +108,8 @@ func (h *assetsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}

func main() {
os.Setenv("TSNET_FORCE_LOGIN", "1")

s := &tsnet.Server{
Hostname: "telltail",
}
Expand Down

0 comments on commit a0ea9e1

Please sign in to comment.