Re: mod_lua / mod_proxy: set cookie on the proxied connection

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

 



On Fri, Jan 8, 2021 at 10:30 AM Gerry <ml+apache@xxxxxxxx> wrote:
>
> > function proxy_handler(r)
> >       if r.uri:match("^/local/websocket") then
> >               r.handler = "proxy-server"
> >               r.proxyreq = apache2.PROXYREQ_REVERSE
> >               r.filename = "proxy:wss://192.0.2.1/remote/websocket"

I'm not a Lua coder but wouldn't (something like) this here:

                  local cookie_in = r.headers_in['Cookie']
                  if cookie_in ~= nil then
                    cookie_in = cookie_in .. "; key=value"
                  else
                    cookie_in = "key=value"
                  end
                  r.headers_in['Cookie'] = cookie_in

work?

> >               return apache2.OK
> >       end
> >       return apache2.DECLINED
> > end


Regards;
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-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