Skip to content

Commit

Permalink
fix: fix resource display when redirecting from /notebooks/* (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
echarles authored Sep 12, 2022
1 parent 4f1e927 commit fa65c00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nbclassic/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,13 @@ def initialize_handlers(self):
# Default routes
# Order matters. The first handler to match the URL will handle the request.
handlers = []
# Add a redirect from /notebooks to /edit
# Add a redirect from /notebooks to /files
# for opening non-ipynb files in edit mode.
handlers.append(
(
rf"/{self.file_url_prefix}/((?!.*\.ipynb($|\?)).*)",
RedirectHandler,
{"url": self.serverapp.base_url+"edit/{0}"}
{"url": self.serverapp.base_url+"files/{0}"}
)
)

Expand Down

0 comments on commit fa65c00

Please sign in to comment.