AlinsRan opened a new pull request, #14256: URL: https://github.com/apache/apisix/pull/14256
### Description HTTP header names are case-insensitive. The forward-auth plugin currently merges headers in a plain Lua table, where two spellings of the same field can coexist. This leaves the HTTP client to resolve the duplicate after the plugin has already chosen which values to forward. Use the header table from `lua-resty-http` during the merge so an explicit `extra_headers` value can override a generated value and `request_headers` only fills missing fields. Each field keeps its first spelling. ### Verification The forward-auth integration tests check the field names and values received by the auth service with both `ngx_http_ffi_client` and `lua-resty-http`. ### Checklist - [x] I have explained the need for this PR and the problem it solves - [x] I have explained the changes or the new features added to this PR - [x] I have added tests corresponding to this change - [x] I have updated the documentation to reflect this change - [x] I have verified that this change is backward compatible -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
