Skip to content

Commit

Permalink
fixes #3728 with solution provided by httpd devs
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Aug 15, 2024
1 parent eb4494e commit 738f542
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mod_ood_proxy/lib/ood/proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ function set_reverse_proxy(r, conn)
-- find protocol used by parsing the request headers
local protocol = (r.headers_in['Upgrade'] and "ws://" or "http://")

-- setup request to use mod_proxy for the reverse proxy
r.handler = "proxy-server"
r.proxyreq = apache2.PROXYREQ_REVERSE

-- define reverse proxy destination using connection object
if conn.socket then
r.filename = "proxy:unix:" .. conn.socket .. "|" .. protocol .. "localhost" .. conn.uri
r.handler = "proxy:unix:" .. conn.socket .. "|" .. protocol .. "localhost"
else
r.filename = "proxy:" .. protocol .. conn.server .. conn.uri
r.handler = "proxy:" .. protocol .. conn.server
end

r.filename = conn.uri

-- include useful information for the backend server

-- provide the protocol used
Expand Down

0 comments on commit 738f542

Please sign in to comment.