feat: use root path for passthrough (#141)

pull/145/head
Jeff Malnick 6 years ago committed by GitHub
parent 993a6f1680
commit 6c2a17c845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -45,10 +45,10 @@ func (c *Controller) handler(props HandlerProperties) (http.Handler, error) {
if err != nil {
panic(err)
}
c.logger.Warn("serving passthrough files at /passthrough", "path", abs)
c.logger.Warn("serving passthrough files at /", "path", abs)
fs := http.FileServer(http.Dir(abs))
prefixHandler := http.StripPrefix("/passthrough/", fs)
mux.Handle("/passthrough/", prefixHandler)
prefixHandler := http.StripPrefix("/", fs)
mux.Handle("/", prefixHandler)
}
h, err := handleGrpcGateway(c)

Loading…
Cancel
Save