allow localhost->localhost base proxying
parent
c91c1e5ddb
commit
ae56c1744e
|
|
@ -23,6 +23,7 @@ func (s *Server) Proxy(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
func (s *Server) lookup(host string) (*url.URL, error) {
|
func (s *Server) lookup(host string) (*url.URL, error) {
|
||||||
host = strings.Split(host, ".")[0]
|
host = strings.Split(host, ".")[0]
|
||||||
|
host = strings.Split(host, ":")[0]
|
||||||
v := packable.NewURL()
|
v := packable.NewURL()
|
||||||
err := s.db.Get(nsRouting, host, v)
|
err := s.db.Get(nsRouting, host, v)
|
||||||
return v.URL(), err
|
return v.URL(), err
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
package server
|
||||||
|
|
||||||
|
// empty url -> OK //TODO
|
||||||
Loading…
Reference in New Issue