summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/build.rs7
-rw-r--r--runtime/examples/hello_runtime.rs1
-rw-r--r--runtime/web_worker.rs4
-rw-r--r--runtime/worker.rs5
4 files changed, 16 insertions, 1 deletions
diff --git a/runtime/build.rs b/runtime/build.rs
index e6f7de641..3003fb231 100644
--- a/runtime/build.rs
+++ b/runtime/build.rs
@@ -48,10 +48,12 @@ fn create_runtime_snapshot(snapshot_path: &Path, files: Vec<PathBuf>) {
None,
None,
None,
+ None,
),
deno_websocket::init::<deno_websocket::NoWebSocketPermissions>(
"".to_owned(),
None,
+ None,
),
deno_webstorage::init(None),
deno_crypto::init(None),
@@ -62,7 +64,10 @@ fn create_runtime_snapshot(snapshot_path: &Path, files: Vec<PathBuf>) {
false, // No --unstable.
),
deno_ffi::init::<deno_ffi::NoFfiPermissions>(false),
- deno_net::init::<deno_net::NoNetPermissions>(None, false), // No --unstable.
+ deno_net::init::<deno_net::NoNetPermissions>(
+ None, false, // No --unstable.
+ None,
+ ),
deno_http::init(),
];
diff --git a/runtime/examples/hello_runtime.rs b/runtime/examples/hello_runtime.rs
index eaedcac10..e3a8b88b2 100644
--- a/runtime/examples/hello_runtime.rs
+++ b/runtime/examples/hello_runtime.rs
@@ -27,6 +27,7 @@ async fn main() -> Result<(), AnyError> {
args: vec![],
debug_flag: false,
unstable: false,
+ unsafely_treat_insecure_origin_as_secure: None,
root_cert_store: None,
user_agent: "hello_runtime".to_string(),
seed: None,
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 3f68fc4e6..1349c510a 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -253,6 +253,7 @@ pub struct WebWorkerOptions {
pub args: Vec<String>,
pub debug_flag: bool,
pub unstable: bool,
+ pub unsafely_treat_insecure_origin_as_secure: Option<Vec<String>>,
pub root_cert_store: Option<RootCertStore>,
pub user_agent: String,
pub seed: Option<u64>,
@@ -304,10 +305,12 @@ impl WebWorker {
options.root_cert_store.clone(),
None,
None,
+ options.unsafely_treat_insecure_origin_as_secure.clone(),
),
deno_websocket::init::<Permissions>(
options.user_agent.clone(),
options.root_cert_store.clone(),
+ options.unsafely_treat_insecure_origin_as_secure.clone(),
),
deno_broadcast_channel::init(
options.broadcast_channel.clone(),
@@ -341,6 +344,7 @@ impl WebWorker {
deno_net::init::<Permissions>(
options.root_cert_store.clone(),
options.unstable,
+ options.unsafely_treat_insecure_origin_as_secure.clone(),
),
ops::os::init(),
ops::permissions::init(),
diff --git a/runtime/worker.rs b/runtime/worker.rs
index 69602d0dd..f8b0edb64 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -50,6 +50,7 @@ pub struct WorkerOptions {
pub args: Vec<String>,
pub debug_flag: bool,
pub unstable: bool,
+ pub unsafely_treat_insecure_origin_as_secure: Option<Vec<String>>,
pub root_cert_store: Option<RootCertStore>,
pub user_agent: String,
pub seed: Option<u64>,
@@ -103,10 +104,12 @@ impl MainWorker {
options.root_cert_store.clone(),
None,
None,
+ options.unsafely_treat_insecure_origin_as_secure.clone(),
),
deno_websocket::init::<Permissions>(
options.user_agent.clone(),
options.root_cert_store.clone(),
+ options.unsafely_treat_insecure_origin_as_secure.clone(),
),
deno_webstorage::init(options.origin_storage_dir.clone()),
deno_crypto::init(options.seed),
@@ -131,6 +134,7 @@ impl MainWorker {
deno_net::init::<Permissions>(
options.root_cert_store.clone(),
options.unstable,
+ options.unsafely_treat_insecure_origin_as_secure.clone(),
),
ops::os::init(),
ops::permissions::init(),
@@ -300,6 +304,7 @@ mod tests {
args: vec![],
debug_flag: false,
unstable: false,
+ unsafely_treat_insecure_origin_as_secure: None,
root_cert_store: None,
seed: None,
js_error_create_fn: None,