ECAP: How to Add header to get request

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ECAP: How to Add header to get request

Ivan Kolesnikov
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 \
        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
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ECAP: How to Add header to get request

Amos Jeffries
Administrator
On 30/03/2017 9:37 p.m., Ivan Kolesnikov wrote:
>
> Please advice how to correctly add header in get requests?

FYI: This is best directed towards the actual e-CAP support location(s)
mentioned in <http://e-cap.org/Support>.

Support from here is more topics about how to configure Squid to use
eCAP modules, and which ones are most useful for whatever the task is.
Code questions (even about Squid code) are technically off-topic.

HTH
Amos

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ECAP: How to Add header to get request

Alex Rousskov
On 03/30/2017 03:56 AM, Amos Jeffries wrote:
> On 30/03/2017 9:37 p.m., Ivan Kolesnikov wrote:
>>
>> Please advice how to correctly add header in get requests?
>
> FYI: This is best directed towards the actual e-CAP support location(s)
> mentioned in <http://e-cap.org/Support>.

Yes, general eCAP questions should not be discussed here. However,
Ivan's problem (or at least one of the problems) is with Squid
configuration, which is appropriate for this mailing list.

 >> ecap_service ecapModifier respmod_precache

To modify requests, use reqmod_precache vectoring point. If you need to
modify requests and responses, then use both reqmod_precache and
respmod_precache vectoring points.

Alex.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Loading...