Skip to content

Commit

Permalink
Correct the http header var
Browse files Browse the repository at this point in the history
  • Loading branch information
An Tran committed Sep 25, 2023
1 parent a0131de commit d3b86b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gateway/src/apicast/http_proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ end
function _M.request(upstream, proxy_uri)
local uri = upstream.uri

if not ngx.var.proxy_authorization then
if not ngx.var.http_proxy_authorization then
if proxy_uri.user or proxy_uri.password then
local proxy_auth = "Basic " .. ngx.encode_base64(concat({ proxy_uri.user or '', proxy_uri.password or '' }, ':'))
ngx.req.set_header("Proxy-Authorization", proxy_auth)
Expand Down

0 comments on commit d3b86b9

Please sign in to comment.