chore: fixes to http mux

This commit is contained in:
Jon Lundy
2023-01-09 12:32:45 -07:00
parent 4fc9c78dae
commit 0810ec73a0
9 changed files with 93 additions and 27 deletions

View File

@@ -21,6 +21,11 @@ var _ = apps.Register(20, func(ctx context.Context, svc *service.Harness) error
mux := mux.New()
s.Handler = cors.AllowAll().Handler(mux)
// s.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// log.Println(r.URL.Path)
// mux.ServeHTTP(w, r)
// })
s.Addr = env.Default("EV_HTTP", ":8080")
if strings.HasPrefix(s.Addr, ":") {
s.Addr = "[::]" + s.Addr