added non-stanrd x-forward-path-prefix header

This commit is contained in:
2024-12-18 01:21:44 +09:00
parent 3fc48eb590
commit b147795ae0
2 changed files with 25 additions and 12 deletions

View File

@ -1009,7 +1009,7 @@ func NewServer(ctx context.Context, logger Logger, ctl_addrs []string, rpc_addrs
//s.pxy_mux.Handle(s.ctl_prefix + "/ui/", http.StripPrefix(s.ctl_prefix, http.FileServer(http.Dir(cwd)))) // TODO: proper directory. it must not use the current working directory...
s.pxy_mux.Handle("/_http/{conn_id}/{route_id}/{trailer...}", &server_proxy_http_main{s: &s, prefix: "/_http"})
s.pxy_mux.Handle("/_init/{conn_id}/{route_id}/{trailer...}", &server_proxy_http_init{s: &s})
s.pxy_mux.Handle("/_init/{conn_id}/{route_id}/{trailer...}", &server_proxy_http_init{s: &s, prefix: "/_init"})
s.pxy_mux.Handle("/", &server_proxy_http_main{s: &s})
s.pxy_addr = make([]string, len(pxy_addrs))