Skip to content

Commit

Permalink
fixes #3728 with solution provided by httpd devs (#3730)
Browse files Browse the repository at this point in the history
* fixes #3728 with solution provided by httpd devs

* use base uri and let httpd set the query parameters
  • Loading branch information
johrstrom committed Sep 5, 2024
1 parent 55f4464 commit 951d640
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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
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

0 comments on commit 951d640

Please sign in to comment.