mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 12:25:53 +08:00
Fix: HTTP request node PARAMS parameters, if ':' appears in the value… (#4403)
Co-authored-by: Haolin Wang-汪皓临 <haolin.wang@atlaslovestravel.com>
This commit is contained in:
parent
ba06447cd5
commit
e90eccdf92
@ -6,11 +6,11 @@ import type { KeyValue } from '../types'
|
|||||||
const UNIQUE_ID_PREFIX = 'key-value-'
|
const UNIQUE_ID_PREFIX = 'key-value-'
|
||||||
const strToKeyValueList = (value: string) => {
|
const strToKeyValueList = (value: string) => {
|
||||||
return value.split('\n').map((item) => {
|
return value.split('\n').map((item) => {
|
||||||
const [key, value] = item.split(':')
|
const [key, ...others] = item.split(':')
|
||||||
return {
|
return {
|
||||||
id: uniqueId(UNIQUE_ID_PREFIX),
|
id: uniqueId(UNIQUE_ID_PREFIX),
|
||||||
key: key.trim(),
|
key: key.trim(),
|
||||||
value: value?.trim(),
|
value: others.join(':').trim(),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user