Skip to content
Open
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
5 changes: 5 additions & 0 deletions auth-request.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ function auth_request(txn, be, path, method, hdr_req, hdr_succeed, hdr_fail)
return
end

-- Enclose IPv6 addresses in square brackets
if not addr:find("%.") and not addr:match("^%[.*%]:%d+$") then
addr = string.format("[%s]:%s", addr:match("^(.*):(%d+)$"))
end

-- Transform table of request headers from haproxy's to
-- socket.http's format.
local headers = {}
Expand Down