Skip to content

Commit

Permalink
feat: fail fast if TS_AUTHKEY isn't present
Browse files Browse the repository at this point in the history
  • Loading branch information
ajitid committed Aug 7, 2024
1 parent a0ea9e1 commit f703c1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ func (h *assetsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}

func main() {
if len(os.Getenv("TS_AUTHKEY")) == 0 {
log.Fatal("`TS_AUTHKEY` environment variable is not set")
}

os.Setenv("TSNET_FORCE_LOGIN", "1")

s := &tsnet.Server{
Expand Down

0 comments on commit f703c1a

Please sign in to comment.