Skip to content

HTTP Proxy TunnelHandler 使用 BasicAuth 中间件无效 #13

Description

@shuqingzai
  1. 在几个代理的 ServeHTTP 中运行中间件后,如果 err == nil ,不管 response 返回什么状态码都不会终止连接目标服务器
    参考:
    if err != nil && err != MethodNotSupportErr {
  2. 在 BasicAuth 中间件中,如果验证不通过,会返回 statusCode = 407 但是由于 1 ,这个响应会被忽略,继续连接目标服务器
    参考:
    return BasicUnauthorized(req, realm), nil

是我用的方法不对吗?还是说这里逻辑有问题??

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions