Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #3728 with solution provided by httpd devs
Browse files Browse the repository at this point in the history
johrstrom committed Aug 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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
@@ -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

0 comments on commit 738f542

Please sign in to comment.