Stupid typo

This commit is contained in:
Alexandre Aubin 2023-01-09 20:51:00 +01:00
parent d85dc4f999
commit 4e92965eda

View file

@ -423,7 +423,7 @@ function clear_headers()
-- Clear auth header only if it's a 'Basic' auth stuff, not 'Bearer' stuff
-- Also ignore PROPFIND routes used by Nextcloud (et al.?)
if ngx.var.request_method ~= "PROPFIND" and ngx.req.get_headers()["Authorization"] then
_, _, b64_cred = string.find(auth_header, "^Basic%s+(.+)$")
_, _, b64_cred = string.find(ngx.req.get_headers()["Authorization"], "^Basic%s+(.+)$")
if b64_cred ~= nil then
ngx.req.clear_header("Authorization")
end