Search squid archive

Overwrite an URL containing an IP when it is requested with a custom Host header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux