feat: open proxy token file

This commit is contained in:
2026-06-16 15:00:43 -04:00
parent 2cedcf448c
commit a589341214
6 changed files with 107 additions and 24 deletions

View File

@@ -19,7 +19,13 @@ func runServer(argv []string) int {
return 2
}
srv := &server{token: envToken(), maxSize: envMaxSize()}
token, err := envToken()
if err != nil {
fmt.Fprintf(os.Stderr, "open-proxy serve: %v\n", err)
return 1
}
srv := &server{token: token, maxSize: envMaxSize()}
mux := http.NewServeMux()
mux.HandleFunc("GET /health", func(w http.ResponseWriter, r *http.Request) {