Search squid archive

ECAP: How to Add header to get request

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

 



Hi Everyone,

I need add a Cookie header for some get requests via SQUID.
I can add: 'request_header_add Cookie "My_cookie_value" all' in squid.conf, but in this case Cookie header will be add for all requests and I can't manipulate with my "My_cookie_value". I updated adapter_modifying.cc and add the following code in Adapter::Xaction::start() function:
static const libecap::Name name_cookie("Cookie");
const libecap::Header::Value value_cookie = libecap::Area::FromTempString("video_key=My_cookie_value");
        adapted->header().add(name_cookie, value_cookie);
In that case Cookie header was add in all responses.

Please see my squid.conf:
loadable_modules /usr/local/lib/ecap/ecap_adapter_modifying.so
ecap_enable on
ecap_service ecapModifier respmod_precache \
        uri=ecap://e-cap.org/ecap/services/sample/modifying \
        victim=awerewrewrewrwerefbfcvglkflds9349rdsgfdk9dfgkj95tfnvxcncbnbv \
        replacement=$$$$$$$
adaptation_access ecapModifier allow all


Please advice how to correctly add header in get requests?


Best Regards,
Ivan Kolesnikov
_______________________________________________
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