From 0100ad1bd7c0fbb068585902db78d0edce3d497d Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 6 Dec 2025 06:39:30 -0800 Subject: [PATCH] Add user_data/image_outputs to the Gradio allowed paths --- server.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 0c5d14ce..d8fb2c22 100644 --- a/server.py +++ b/server.py @@ -101,6 +101,11 @@ def create_interface(): auth.extend(x.strip() for line in file for x in line.split(',') if x.strip()) auth = [tuple(cred.split(':')) for cred in auth] + # Allowed paths + allowed_paths = ["css", "js", "extensions", "user_data/cache"] + if not shared.args.multi_user: + allowed_paths.append("user_data/image_outputs") + # Import the extensions and execute their setup() functions if shared.args.extensions is not None and len(shared.args.extensions) > 0: extensions_module.load_extensions() @@ -237,7 +242,7 @@ def create_interface(): ssl_keyfile=shared.args.ssl_keyfile, ssl_certfile=shared.args.ssl_certfile, root_path=shared.args.subpath, - allowed_paths=["css", "js", "extensions", "user_data/cache"] + allowed_paths=allowed_paths, )