Skip to content

bug: HTTP logger should avoid add an empty Authorization header if conf.auth_header is not set #7431

Description

@tokers

Current Behavior

Currently, whether we configure conf.auth_header or not, APISIX HTTP logger will add the authorization header.

image

Log server will reject such requests since they violate the HTTP syntax.

image

Expected Behavior

Avoid adding this header if conf.auth_header is empty.

Error Logs

No response

Steps to Reproduce

Environment

  • APISIX version (run apisix version): latest
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions