[Fix]Added request header validation (#9915)
This commit is contained in:
parent
1f7884609a
commit
c9bba819bd
|
|
@ -725,6 +725,7 @@ const project = {
|
|||
task_manager_number_tips: 'Please enter TaskManager number',
|
||||
http_url: 'Http Url',
|
||||
http_url_tips: 'Please Enter Http Url',
|
||||
http_url_validator: 'The request address must contain HTTP or HTTPS',
|
||||
http_method: 'Http Method',
|
||||
http_parameters: 'Http Parameters',
|
||||
http_check_condition: 'Http Check Condition',
|
||||
|
|
|
|||
|
|
@ -715,6 +715,7 @@ const project = {
|
|||
task_manager_number_tips: '请输入TaskManager数量',
|
||||
http_url: '请求地址',
|
||||
http_url_tips: '请填写请求地址(必填)',
|
||||
http_url_validator: '请求地址需包含http或者https',
|
||||
http_method: '请求类型',
|
||||
http_parameters: '请求参数',
|
||||
http_check_condition: '校验条件',
|
||||
|
|
|
|||
|
|
@ -55,6 +55,9 @@ export function useHttp(model: { [field: string]: any }): IJsonItem[] {
|
|||
if (!value) {
|
||||
return new Error(t('project.node.http_url_tips'))
|
||||
}
|
||||
if (value.search(new RegExp('http[s]{0,1}:\/\/([\w.]+\/?)\S*', 'i'))) {
|
||||
return new Error(t('project.node.http_url_validator'))
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue