[squid-users] Change http header / User-Agent based on Client IP address

From: <dummy4711_at_vollbio.de>
Date: Mon, 26 May 2014 18:35:39 +0200

Hi,

I did a lot of research but I didn't find a solution for my question so hopefully you guys have an idea.

Question: is it possible that Squid replaces the http user agent based on the client IP address?

As the request_header_replace directive doesn't support acl (like http_access) I thought about using if / endif

Something like:

if <source_ip=a.b.c.d>
  request_header_replace User-Agent Device#1
endif
 
if <source_ip=e.f.g.h>
  request_header_replace User-Agent Device#2
endif

Unfortunately I don't have any clou how the if statement should look like and if that's possible or not.

Any ideas how this can be done?

Kind regards
Received on Mon May 26 2014 - 16:35:52 MDT

This archive was generated by hypermail 2.2.0 : Tue May 27 2014 - 12:00:13 MDT