diff --git a/backend/windmill-worker/src/js_eval.rs b/backend/windmill-worker/src/js_eval.rs index b86327be28..fb3a378861 100644 --- a/backend/windmill-worker/src/js_eval.rs +++ b/backend/windmill-worker/src/js_eval.rs @@ -638,14 +638,12 @@ pub struct NativeAnnotation { pub fn get_annotation(inner_content: &str) -> NativeAnnotation { let mut res = NativeAnnotation { useragent: None, proxy: None }; - #[cfg(feature = "enterprise")] let anns = inner_content .lines() .take_while(|x| x.starts_with("//")) .map(|x| x.to_string().trim_start_matches("//").trim().to_string()) .collect_vec(); - #[cfg(feature = "enterprise")] for ann in anns.iter() { if ann.starts_with("useragent") { res.useragent = Some(ann.trim_start_matches("useragent").trim().to_string()); @@ -704,6 +702,11 @@ pub async fn eval_fetch_timeout( let ann = get_annotation(&ts_expr); + #[cfg(not(feature = "enterprise"))] + if ann.proxy.is_some() { + return Err(Error::ExecutionErr("Proxy is an EE feature".to_string()).into()); + } + let mut extra_logs = String::new(); if ann.useragent.is_some() { extra_logs.push_str(&format!("useragent: {}\n", ann.useragent.as_ref().unwrap())); diff --git a/frontend/src/lib/components/LightweightArgInput.svelte b/frontend/src/lib/components/LightweightArgInput.svelte index e14048b475..ac925ca030 100644 --- a/frontend/src/lib/components/LightweightArgInput.svelte +++ b/frontend/src/lib/components/LightweightArgInput.svelte @@ -182,8 +182,12 @@ } } + let prevDefaultValue: any = undefined async function changeDefaultValue(inputCat, defaultValue) { - value = defaultValue + if (value == null || value == undefined || value == prevDefaultValue) { + value = defaultValue + } + prevDefaultValue = defaultValue if (value == null || value == undefined) { if (defaultValue === undefined || defaultValue === null) { if (inputCat === 'string') {