allow localhost->localhost base proxying

master
Bel LaPointe 2019-03-06 09:41:16 -07:00
parent c91c1e5ddb
commit ae56c1744e
2 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ func (s *Server) Proxy(w http.ResponseWriter, r *http.Request) {
func (s *Server) lookup(host string) (*url.URL, error) {
host = strings.Split(host, ".")[0]
host = strings.Split(host, ":")[0]
v := packable.NewURL()
err := s.db.Get(nsRouting, host, v)
return v.URL(), err

3
server/proxy_test.go Normal file
View File

@ -0,0 +1,3 @@
package server
// empty url -> OK //TODO