Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #3728 with solution provided by httpd devs #3730

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion mod_ood_proxy/lib/pun_proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function pun_proxy_handler(r)
local conn = {}
conn.user = user
conn.socket = pun_socket_root .. "/" .. user .. "/passenger.sock"
conn.uri = r.unparsed_uri
conn.uri = r.uri

-- start up PUN if socket doesn't exist
local err = nil
Expand Down
Loading