allow localhost->localhost base proxying
This commit is contained in:
@@ -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
3
server/proxy_test.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package server
|
||||
|
||||
// empty url -> OK //TODO
|
||||
Reference in New Issue
Block a user