Skip to content

Commit

Permalink
fix: clear authz related headers for Katsu public endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Aug 5, 2024
1 parent 320d6f8 commit da22a6e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/proxy_auth_v2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ if req_method == "GET" and (
req_uri_no_qp == "/api/metadata/api/public_dataset" or
req_uri_no_qp == "/api/metadata/api/public_rules"
) then
-- Clear possible Katsu authorization injections for old remote user middleware
ngx.req.clear_header("X-User")
ngx.req.clear_header("X-User-Role")
ngx.req.clear_header("X-Authorization")

goto script_end
end

Expand Down

0 comments on commit da22a6e

Please sign in to comment.