Skip to content

Commit 6ada253

Browse files
committed
Backport PR #1975: add Authorization to allowed CORS headers
so that CORS requests can use token authentication in the Authorization header by default. cf jupyterlab/jupyterlab#1416 Signed-off-by: Min RK <[email protected]>
1 parent f50aa57 commit 6ada253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebook/base/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def finish(self, *args, **kwargs):
414414
return super(APIHandler, self).finish(*args, **kwargs)
415415

416416
def options(self, *args, **kwargs):
417-
self.set_header('Access-Control-Allow-Headers', 'accept, content-type')
417+
self.set_header('Access-Control-Allow-Headers', 'accept, content-type, authorization')
418418
self.set_header('Access-Control-Allow-Methods',
419419
'GET, PUT, POST, PATCH, DELETE, OPTIONS')
420420
self.finish()

0 commit comments

Comments
 (0)