Skip to content

Commit 325217b

Browse files
committed
Fixed ordering in handlers
The `oauth_callback` requests were handled by the ProxyHandler, effectively causing the request to ping-pong between JupyterHub Login and `/oauth_callback`
1 parent 2a83343 commit 325217b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

jupyter_server_proxy/standalone/proxy.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,16 @@ def __init__(self, *args, **kwargs):
153153
app = Application(
154154
[
155155
# Redirects from the JupyterHub might not contain a slash
156-
(rf"^{escaped_prefix}$", RedirectHandler, dict(url=rf"^{escaped_prefix}/")),
156+
(f"^{escaped_prefix}$", RedirectHandler, dict(url=f"^{escaped_prefix}/")),
157+
(f"^{escaped_prefix}/oauth_callback", HubOAuthCallbackHandler),
157158
(
158-
rf"^{escaped_prefix}/(.*)",
159+
f"^{escaped_prefix}/(.*)",
159160
Proxy,
160161
dict(
161162
state={},
162163
# ToDo: progressive=progressive
163164
),
164165
),
165-
(
166-
rf"^{escaped_prefix}/oauth_callback",
167-
HubOAuthCallbackHandler,
168-
),
169166
],
170167
**settings,
171168
)

0 commit comments

Comments
 (0)