feat: use root path for passthrough (#141)

This commit is contained in:
Jeff Malnick authored and GitHub committed 2020-06-23 10:34:07 -07:00
1 parent 993a6f1680
commit 6c2a17c845
1 file changed
+3 -3
+3 -3
View File
@@ -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)