Search squid archive

Re: Dynamic HTTP Header Addition

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

 



Hello Alex , Thank you very much , shall try this and confirm Rgds -----Original Message----- From: Alex Rousskov Sent: Tuesday, September 03, 2013 8:45 PM To: squid-users@xxxxxxxxxxxxxxx Subject: Re: Dynamic HTTP Header Addition
On 09/03/2013 04:37 AM, Norbert Naveen wrote:
Hello ,
   There is possibility of adding a new HTTP header via
    Usage:   request_header_add field-name field-value acl1 [acl2] ...
    Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all

   Wanted to know if the HTTP header value can be dynamic ?

Yes, the example you quoted already contains a dynamic header value
(HTTP client certificate issuer).


and can
invoke a program to fetch the Value dynamically and populate?


Yes, with recent Squids, you can dynamically set annotations and then
use %note macro to add those annotations to HTTP request headers.
Annotations can be set using an eCAP adapter, a url_rewrite_program or,
IIRC, an external ACL. Here is a sketch:

 url_rewrite_program /this/helper/replies/with OK note1=dynamicValue
 acl hasNote1 note note1
 request_header_add X-Note1 "%{note1}note" hasNote1


HTH,

Alex.





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

  Powered by Linux