fix allowed paths

This commit is contained in:
Vladimir Mandic
2023-06-09 10:56:47 -04:00
parent ec6d05481d
commit 2396d43df0
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -59,3 +59,5 @@ Tech that can be integrated as part of the core workflow...
- port `p.all_hr_prompts`
- test `lyco_patch_lora`
- fix `lyco` logging
- save `ui-settings.json`
- `data-dir` security issues
+3
View File
@@ -256,8 +256,11 @@ def start_ui():
max_threads=64,
show_api=True,
favicon_path='html/logo.ico',
allowed_paths=[os.path.dirname(__file__), cmd_opts.data_dir],
app_kwargs=gradio_kwargs,
)
if cmd_opts.data_dir is not None:
ui_tempdir.register_tmp_file(shared.demo, os.path.join(cmd_opts.data_dir, 'x'))
shared.log.info(f'Local URL: {local_url}')
if cmd_opts.docs:
shared.log.info(f'API Docs: {local_url[:-1]}/docs') # {local_url[:-1]}?view=api