Skip to content

Commit 7b80617

Browse files
authored
Merge pull request #314 from kevin-bates/support-resources
Support serving kernelspec resources
2 parents 522b4fc + 2431d38 commit 7b80617

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

kernel_gateway/services/kernelspecs/handlers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"""Tornado handlers for kernel specs."""
44

55
import notebook.services.kernelspecs.handlers as notebook_handlers
6+
import notebook.kernelspecs.handlers as notebook_kernelspecs_resources_handlers
7+
68
from ...mixins import TokenAuthorizationMixin, CORSMixin, JSONErrorsMixin
79

810
# Extends the default handlers from the notebook package with token auth, CORS
@@ -12,3 +14,8 @@
1214
# Everything should have CORS and token auth
1315
bases = (TokenAuthorizationMixin, CORSMixin, JSONErrorsMixin, cls)
1416
default_handlers.append((path, type(cls.__name__, bases, {})))
17+
18+
for path, cls in notebook_kernelspecs_resources_handlers.default_handlers:
19+
# Everything should have CORS and token auth
20+
bases = (TokenAuthorizationMixin, CORSMixin, JSONErrorsMixin, cls)
21+
default_handlers.append((path, type(cls.__name__, bases, {})))

0 commit comments

Comments
 (0)