Apache2 具有基本身份验证的反向代理:客户端发送错误的“授权”标头

Apache2 具有基本身份验证的反向代理:客户端发送错误的“授权”标头

我正在尝试使用 BasicAuth 在 Apache2 反向代理后面让 jupyterhub 再次工作。

Invalid response: 401 Unauthorized自从我将其更新到 Jupyterhub 1.1 后,它在加载诸如 之类的文件时会吐出一些static/lab/vendors~main.52a0cabd079a8f53ed4d.js

问题是客户端发送带有以下请求标头的请求:

Authorization: token 0024afb0.................181548ab

它看起来应该是这样的:

Authorization: Basic aG9lbH................E5OTQ=

您知道这可能导致什么原因吗?

我的当前配置如下:

<Location /jupyter>                                                                                                                                                                                                                                                                                                          

        AuthName "..."
        AuthType Basic
        AuthBasicProvider ldap
        ... # other ldap stuff

        Require valid-user

        # Preserve Host header to avoid cross-origin problems
        ProxyPreserveHost On

        ProxyPass        "http://.../jupyter" keepalive=On
        ProxyPassReverse "http://.../jupyter"
        ProxyPassReverse "https://.../jupyter"

        # JupyterHub
        RewriteCond %{HTTP:Connection} Upgrade [NC]
        RewriteCond %{HTTP:Upgrade} websocket [NC]

        RewriteRule /jupyter/(.*) ws://.../jupyter/$1 [P,L]
        RewriteRule /jupyter/(.*) http://.../jupyter/$1 [P,L]

        # TimeOut 600

</Location>

相关内容