mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-28 20:21:52 +01:00
Fix recent requests loading on startup
This commit is contained in:
@@ -63,7 +63,7 @@ const validateHttpHeader = (v: string) => {
|
||||
return true;
|
||||
}
|
||||
|
||||
const hi = v.replace(/\$\{\[\s*[^\]\s]+\s*]}/gi, 'fo');
|
||||
console.log('V', v, '-->', hi);
|
||||
return v.match(/^[a-zA-Z0-9-_]+$/) !== null;
|
||||
// Template strings are not allowed so we replace them with a valid example string
|
||||
const withoutTemplateStrings = v.replace(/\$\{\[\s*[^\]\s]+\s*]}/gi, '123');
|
||||
return withoutTemplateStrings.match(/^[a-zA-Z0-9-_]+$/) !== null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user