mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 00:55:53 +08:00
fix: workflow http node timeout & url check (#4175)
This commit is contained in:
parent
4aa21242b6
commit
8137d63000
@ -68,7 +68,7 @@ const Timeout: FC<Props> = ({ readonly, payload, onChange }) => {
|
||||
value={connect}
|
||||
onChange={v => onChange?.({ ...payload, connect: v })}
|
||||
min={1}
|
||||
max={max_connect_timeout ?? 300}
|
||||
max={max_connect_timeout || 300}
|
||||
/>
|
||||
<InputField
|
||||
title={t('workflow.nodes.http.timeout.readLabel')!}
|
||||
@ -78,7 +78,7 @@ const Timeout: FC<Props> = ({ readonly, payload, onChange }) => {
|
||||
value={read}
|
||||
onChange={v => onChange?.({ ...payload, read: v })}
|
||||
min={1}
|
||||
max={max_read_timeout ?? 600}
|
||||
max={max_read_timeout || 600}
|
||||
/>
|
||||
<InputField
|
||||
title={t('workflow.nodes.http.timeout.writeLabel')!}
|
||||
@ -88,7 +88,7 @@ const Timeout: FC<Props> = ({ readonly, payload, onChange }) => {
|
||||
value={write}
|
||||
onChange={v => onChange?.({ ...payload, write: v })}
|
||||
min={1}
|
||||
max={max_write_timeout ?? 600}
|
||||
max={max_write_timeout || 600}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -40,9 +40,6 @@ const nodeDefault: NodeDefault<HttpNodeType> = {
|
||||
if (!errorMessages && !payload.url)
|
||||
errorMessages = t('workflow.errorMsg.fieldRequired', { field: t('workflow.nodes.http.api') })
|
||||
|
||||
if (!errorMessages && !payload.url.startsWith('http://') && !payload.url.startsWith('https://'))
|
||||
errorMessages = t('workflow.nodes.http.notStartWithHttp')
|
||||
|
||||
return {
|
||||
isValid: !errorMessages,
|
||||
errorMessage: errorMessages,
|
||||
|
Loading…
x
Reference in New Issue
Block a user