Isolate CDP browser contexts
This commit is contained in:
1 parent
730bd01f57
commit
409ac781d2
6 files changed
+344
-41
No files matched your search
@@ -236,7 +236,11 @@ async fn do_navigate(
|
||||
// any file the obscura process can read. Opt in via
|
||||
// `obscura serve --allow-file-access` when local-HTML
|
||||
// testing is the intended workflow.
|
||||
if url_is_file_scheme(url) && !ctx.default_context.allow_file_access {
|
||||
let allow_file_access = ctx
|
||||
.get_session_page(session_id)
|
||||
.map(|page| page.context.allow_file_access)
|
||||
.unwrap_or(ctx.default_context.allow_file_access);
|
||||
if url_is_file_scheme(url) && !allow_file_access {
|
||||
return Err(
|
||||
"Page.navigate to file:// is disabled. Restart with `obscura serve --allow-file-access` to enable.".to_string()
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user