[squid-users] Overwrite an URL containing an IP when it is requested with a custom Host header
jl
joaolopes at gmx.com
Wed Oct 16 17:12:46 UTC 2019
Hi,
It's possible to configure Squid to overwrite an URL containing an IP when
it is requested with a custom Host header passed by the client when the Host
header resolves to the IP in the URL?
For example for this:
curl -v -k -x IP:PORT http://34.201.191.134/headers -H "Host: httpbin.org"
to return:
"headers": {
"Accept": "*/*",
"Host": "httpbin.org",
"User-Agent": "curl/7.58.0"
}
instead of:
"headers": {
"Accept": "*/*",
"Host": "34.201.191.134",
"If-Modified-Since": "Wed, 16 Oct 2019 16:08:42 GMT",
"User-Agent": "curl/7.58.0"
}
Or for this:
curl -v -k -x IP:PORT http://192.121.151.106/doc/search/ -H "Host:
erlang.org"
to return "HTTP/1.1 200 OK" instead of "HTTP/1.1 404 Not Found"
Thanks.
--
Sent from: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-Users-f1019091.html
More information about the squid-users
mailing list