Closed WENPIN1 closed 5 months ago
I will fixed it asap.
@WENPIN1 Please try the latest version. And the host should be localhost:6188
.
Host: localhost:6188
Why not split the host:port into host string for the convenience ? https://github.com/vicanso/pingap/blob/main/src/util/mod.rs#L208)
pub fn get_host(header: &RequestHeader) -> Option<&str> {
if let Some(host) = header.headers.get("Host") {
return host.to_str().unwrap_or_default().split(':').next();
}
header.uri.host()
}
Sorry for your inconvenience !
-WENPIN
I made a mistake about http host and host. I will look up how other reverse proxies handle it and decide how to adjust it.
After setting host in location conf
[locations.lo] upstream = "charts" path = "/" host = "localhost" proxy_set_headers = ["name:value"] proxy_add_headers = ["name:value"] rewrite = "" plugins = ["pingap:requestId", "pingap:stats"],
The result pf
curl -v "http://localhost:6188"
is incorrect. It seems header.uri.host() didn't work as expected.