Re: [users@httpd] mod_lua / mod_proxy: set cookie on the proxied connection

2021-01-08 Thread Gerry
On 1/8/21 6:23 PM, Yann Ylavic wrote: 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

Re: [users@httpd] mod_lua / mod_proxy: set cookie on the proxied connection

2021-01-08 Thread Gerry
On 1/8/21 5:29 PM, Gerry wrote: Effectively, I would like to modify the proxied HTTP request in such a way that I can inject a Cookie: header. I do not want to set a cookie in the user's client. As usual, after mulling over it for way too long before posting, I found the solution less than an h

Re: [users@httpd] mod_lua / mod_proxy: set cookie on the proxied connection

2021-01-08 Thread Yann Ylavic
On Fri, Jan 8, 2021 at 10:30 AM Gerry 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/websocke

[users@httpd] mod_lua / mod_proxy: set cookie on the proxied connection

2021-01-08 Thread Gerry
I am using a combination of mod_lua, mod_proxy, mod_proxy and mod_proxy_wstunnel. Excerpt from the relevant VirtualHost: LuaHookTranslateName /etc/apache2/proxy.lua proxy_handler Simplified proxy: function proxy_handler(r) if r.uri:match("^/local/websocket") then r.h