Skip to content

Commit 27c00bc

Browse files
authored
Fix opening files from the CLI (#6946)
1 parent 7f1a2f4 commit 27c00bc

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

notebook/app.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class JupyterNotebookApp(NotebookConfigShimMixin, LabServerApp):
234234
app_version = version
235235
extension_url = "/"
236236
default_url = Unicode("/tree", config=True, help="The default URL to redirect to from `/`")
237-
file_url_prefix = "/notebooks"
237+
file_url_prefix = "/tree"
238238
load_other_extensions = True
239239
app_dir = app_dir
240240
subcommands: dict = {}
@@ -329,13 +329,6 @@ def initialize_handlers(self):
329329
# if the serverapp set one
330330
page_config["token"] = ""
331331

332-
self.handlers.append(
333-
(
334-
rf"/{self.file_url_prefix}/((?!.*\.ipynb($|\?)).*)",
335-
web.RedirectHandler,
336-
{"url": ujoin(self.serverapp.base_url, "/edit/{0}")},
337-
)
338-
)
339332
self.handlers.append(("/?", RedirectHandler))
340333
self.handlers.append(("/tree(.*)", TreeHandler))
341334
self.handlers.append(("/notebooks(.*)", NotebookHandler))

0 commit comments

Comments
 (0)