1

I'm trying to get jupyterhub working again behind an Apache2 reverse proxy with BasicAuth.

Since I updated it to Jupyterhub 1.1, it spits out a number of Invalid response: 401 Unauthorized when loading files like static/lab/vendors~main.52a0cabd079a8f53ed4d.js.

The Problem is that the client sends requests with the following request header:

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

What it should look like:

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

Do you have any idea what this might causes?

My current configuration looks like this:

<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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.