Re: Proxy & Dynamic cookies

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

 



On Thu, Feb 23, 2012 at 9:02 PM, Benjamin Dahon
<benjamin.dahon@xxxxxxxxx> wrote:
> Hi,
>
> I've posted the same question on stackoverflow, but I though I'll try as
> well on the users mailing list.
>
> I'm trying to do something I though would be quite simple, but I struggle :)
>
> I have a reverse proxy running on Apache. I'm trying to get urls like
> /a/b?session=1-2 to be proxied to a diffrent host with url /a/b/. This bit
> is done, but I'd like to add a cookie when proxying the request, whose value
> is the first digit before the "-" in the session parameter (from the
> original request).
>
> I home someone can help me.
>
> Thanks

When you say 'add a cookie' do you mean add to the response or add to
the request? If you mean a response cookie, that is quite
straightforward, use mod_rewrite to capture the value in an
environment variable, and mod_headers to output an additional
Set-Cookie header.

If you mean adding a cookie to the request, well, that is much harder.
You can easily add in a request header that looks like the user
presented the cookie, but the user did not, and so would not again on
future requests. You would need to fake to the backend that the client
presented that cookie, and then additionally update the response so
that the client does actually receive the cookie.

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux