Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/app/components/base/tooltip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const Tooltip: FC<TooltipProps> = ({
>
{popupContent && (<div
className={cn(
!noDecoration && 'system-xs-regular relative break-words rounded-md bg-components-panel-bg px-3 py-2 text-text-tertiary shadow-lg',
!noDecoration && 'system-xs-regular relative max-w-[300px] break-words rounded-md bg-components-panel-bg px-3 py-2 text-left text-text-tertiary shadow-lg',
popupClassName,
)}
onMouseEnter={() => triggerMethod === 'hover' && setHoverPopup()}
Expand Down
1 change: 1 addition & 0 deletions web/app/components/workflow/nodes/http/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const nodeDefault: NodeDefault<HttpNodeType> = {
type: BodyType.none,
data: [],
},
ssl_verify: true,
timeout: {
max_connect_timeout: 0,
max_read_timeout: 0,
Expand Down
14 changes: 14 additions & 0 deletions web/app/components/workflow/nodes/http/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { HttpNodeType } from './types'
import Timeout from './components/timeout'
import CurlPanel from './components/curl-panel'
import cn from '@/utils/classnames'
import Switch from '@/app/components/base/switch'
import Field from '@/app/components/workflow/nodes/_base/components/field'
import Split from '@/app/components/workflow/nodes/_base/components/split'
import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars'
Expand Down Expand Up @@ -47,6 +48,7 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
showCurlPanel,
hideCurlPanel,
handleCurlImport,
handleSSLVerifyChange,
} = useConfig(id, data)
// To prevent prompt editor in body not update data.
if (!isDataReady)
Expand Down Expand Up @@ -124,6 +126,18 @@ const Panel: FC<NodePanelProps<HttpNodeType>> = ({
onChange={setBody}
/>
</Field>
<Field
title={t(`${i18nPrefix}.verifySSL.title`)}
tooltip={t(`${i18nPrefix}.verifySSL.warningTooltip`)}
operations={
<Switch
defaultValue={!!inputs.ssl_verify}
onChange={handleSSLVerifyChange}
size='md'
disabled={readOnly}
/>
}>
</Field>
</div>
<Split />
<Timeout
Expand Down
1 change: 1 addition & 0 deletions web/app/components/workflow/nodes/http/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,5 @@ export type HttpNodeType = CommonNodeType & {
body: Body
authorization: Authorization
timeout: Timeout
ssl_verify?: boolean
}
9 changes: 9 additions & 0 deletions web/app/components/workflow/nodes/http/use-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ const useConfig = (id: string, payload: HttpNodeType) => {
setInputs(newInputs)
}, [inputs, setInputs])

const handleSSLVerifyChange = useCallback((checked: boolean) => {
const newInputs = produce(inputs, (draft: HttpNodeType) => {
draft.ssl_verify = checked
})
setInputs(newInputs)
}, [inputs, setInputs])

return {
readOnly,
isDataReady,
Expand All @@ -164,6 +171,8 @@ const useConfig = (id: string, payload: HttpNodeType) => {
toggleIsParamKeyValueEdit,
// body
setBody,
// ssl verify
handleSSLVerifyChange,
// authorization
isShowAuthorization,
showAuthorization,
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/de-DE/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
title: 'Importieren von cURL',
placeholder: 'Fügen Sie hier die cURL-Zeichenfolge ein',
},
verifySSL: {
title: 'SSL-Zertifikat überprüfen',
warningTooltip: 'Das Deaktivieren der SSL-Überprüfung wird für Produktionsumgebungen nicht empfohlen. Dies sollte nur in der Entwicklung oder im Test verwendet werden, da es die Verbindung anfällig für Sicherheitsbedrohungen wie Man-in-the-Middle-Angriffe macht.',
},
},
code: {
inputVars: 'Eingabevariablen',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/en-US/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,10 @@ const translation = {
title: 'Import from cURL',
placeholder: 'Paste cURL string here',
},
verifySSL: {
title: 'Verify SSL Certificate',
warningTooltip: 'Disabling SSL verification is not recommended for production environments. This should only be used in development or testing, as it makes the connection vulnerable to security threats like man-in-the-middle attacks.',
},
},
code: {
inputVars: 'Input Variables',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/es-ES/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,10 @@ const translation = {
title: 'Importar desde cURL',
placeholder: 'Pegar la cadena cURL aquí',
},
verifySSL: {
title: 'Verificar el certificado SSL',
warningTooltip: 'Deshabilitar la verificación SSL no se recomienda para entornos de producción. Esto solo debe utilizarse en desarrollo o pruebas, ya que hace que la conexión sea vulnerable a amenazas de seguridad como ataques de intermediario.',
},
},
code: {
inputVars: 'Variables de entrada',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/fa-IR/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
title: 'وارد کردن از cURL',
placeholder: 'رشته cURL را اینجا بچسبانید',
},
verifySSL: {
title: 'گواهی SSL را تأیید کنید',
warningTooltip: 'غیرفعال کردن تأیید SSL برای محیط‌های تولید توصیه نمی‌شود. این فقط باید در توسعه یا آزمایش استفاده شود، زیرا این کار اتصال را در معرض تهدیدات امنیتی مانند حملات میانی قرار می‌دهد.',
},
},
code: {
inputVars: 'متغیرهای ورودی',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/fr-FR/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
placeholder: 'Collez la chaîne cURL ici',
title: 'Importer à partir de cURL',
},
verifySSL: {
title: 'Vérifier le certificat SSL',
warningTooltip: 'Désactiver la vérification SSL n\'est pas recommandé pour les environnements de production. Cela ne devrait être utilisé que dans le développement ou les tests, car cela rend la connexion vulnérable aux menaces de sécurité telles que les attaques de type \'man-in-the-middle\'.',
},
},
code: {
inputVars: 'Variables de saisie',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/hi-IN/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@ const translation = {
placeholder: 'यहां cURL स्ट्रिंग पेस्ट करें',
title: 'cURL से आयात करें',
},
verifySSL: {
title: 'SSL प्रमाणपत्र की पुष्टि करें',
warningTooltip: 'SSL सत्यापन को अक्षम करना उत्पादन वातावरण के लिए अनुशंसित नहीं है। इसका उपयोग केवल विकास या परीक्षण में किया जाना चाहिए, क्योंकि यह कनेक्शन को मिडल-मैन हमलों जैसे सुरक्षा खतरों के लिए कमजोर बना देता है।',
},
},
code: {
inputVars: 'इनपुट वेरिएबल्स',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/it-IT/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,10 @@ const translation = {
placeholder: 'Incolla qui la stringa cURL',
title: 'Importazione da cURL',
},
verifySSL: {
title: 'Verifica il certificato SSL',
warningTooltip: 'Disabilitare la verifica SSL non è raccomandato per gli ambienti di produzione. Questo dovrebbe essere utilizzato solo in sviluppo o test, poiché rende la connessione vulnerabile a minacce alla sicurezza come gli attacchi man-in-the-middle.',
},
},
code: {
inputVars: 'Variabili di Input',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/ja-JP/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ const translation = {
title: 'cURL からインポート',
placeholder: 'ここに cURL 文字列を貼り付けます',
},
verifySSL: {
title: 'SSL証明書を確認する',
warningTooltip: 'SSL検証を無効にすることは、本番環境では推奨されません。これは開発またはテストのみに使用すべきであり、中間者攻撃などのセキュリティ脅威に対して接続を脆弱にするためです。',
},
},
code: {
inputVars: '入力変数',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/ko-KR/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,10 @@ const translation = {
title: 'cURL 에서 가져오기',
placeholder: '여기에 cURL 문자열 붙여 넣기',
},
verifySSL: {
title: 'SSL 인증서 확인',
warningTooltip: 'SSL 검증을 비활성화하는 것은 프로덕션 환경에서는 권장되지 않습니다. 이는 연결이 중간자 공격과 같은 보안 위협에 취약하게 만들므로 개발 또는 테스트에서만 사용해야 합니다.',
},
},
code: {
inputVars: '입력 변수',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/pl-PL/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
placeholder: 'Wklej tutaj ciąg cURL',
title: 'Importowanie z cURL',
},
verifySSL: {
title: 'Zweryfikuj certyfikat SSL',
warningTooltip: 'Wyłączenie weryfikacji SSL nie jest zalecane w środowiskach produkcyjnych. Powinno to być używane tylko w rozwoju lub testowaniu, ponieważ naraża połączenie na zagrożenia bezpieczeństwa, takie jak ataki typu man-in-the-middle.',
},
},
code: {
inputVars: 'Zmienne wejściowe',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/pt-BR/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
placeholder: 'Cole a string cURL aqui',
title: 'Importar do cURL',
},
verifySSL: {
title: 'Verificar o certificado SSL',
warningTooltip: 'Desabilitar a verificação SSL não é recomendado para ambientes de produção. Isso deve ser usado apenas em desenvolvimento ou teste, pois torna a conexão vulnerável a ameaças de segurança, como ataques man-in-the-middle.',
},
},
code: {
inputVars: 'Variáveis de entrada',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/ro-RO/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
placeholder: 'Lipiți șirul cURL aici',
title: 'Importați din cURL',
},
verifySSL: {
title: 'Verifică certificatul SSL',
warningTooltip: 'Dezactivarea verificării SSL nu este recomandată pentru medii de producție. Acest lucru ar trebui să fie folosit doar în dezvoltare sau testare, deoarece face conexiunea vulnerabilă la amenințări de securitate, cum ar fi atacurile man-in-the-middle.',
},
},
code: {
inputVars: 'Variabile de intrare',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/ru-RU/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
placeholder: 'Вставьте сюда строку cURL',
title: 'Импорт из cURL',
},
verifySSL: {
title: 'Проверить SSL-сертификат',
warningTooltip: 'Отключение проверки SSL не рекомендуется для производственных сред. Это следует использовать только в разработке или тестировании, так как это делает соединение уязвимым для угроз безопасности, таких как атаки «человек посередине».',
},
},
code: {
inputVars: 'Входные переменные',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/sl-SI/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ const translation = {
value: 'Vrednost',
params: 'Parametri',
insertVarPlaceholder: 'vnesite \'/\' za vstavljanje spremenljivke',
verifySSL: {
title: 'Preverite SSL certifikat',
warningTooltip: 'Onemogočanje preverjanja SSL ni priporočljivo za proizvodna okolja. To bi se moralo uporabljati le pri razvoju ali testiranju, saj povezavo izpostavi varnostnim grožnjam, kot so napadi človek-v-sredini.',
},
},
code: {
searchDependencies: 'Išči odvisnosti',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/th-TH/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
title: 'นําเข้าจาก cURL',
placeholder: 'วางสตริง cURL ที่นี่',
},
verifySSL: {
title: 'ตรวจสอบใบรับรอง SSL',
warningTooltip: 'การปิดการตรวจสอบ SSL ไม่แนะนำให้ใช้ในสภาพแวดล้อมการผลิต ควรใช้เฉพาะในระหว่างการพัฒนาหรือการทดสอบเท่านั้น เนื่องจากจะทำให้การเชื่อมต่อมีความเสี่ยงต่อภัยคุกคามด้านความปลอดภัย เช่น การโจมตีแบบ Man-in-the-middle.',
},
},
code: {
inputVars: 'ตัวแปรอินพุต',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/tr-TR/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,10 @@ const translation = {
placeholder: 'cURL dizesini buraya yapıştırın',
title: 'cURL\'den içe aktar',
},
verifySSL: {
title: 'SSL Sertifikasını Doğrula',
warningTooltip: 'SSL doğrulamasını devre dışı bırakmak, üretim ortamları için önerilmez. Bu yalnızca geliştirme veya test aşamalarında kullanılmalıdır, çünkü bağlantıyı adam ortada saldırıları gibi güvenlik tehditlerine karşı savunmasız hale getirir.',
},
},
code: {
inputVars: 'Giriş Değişkenleri',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/uk-UA/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
title: 'Імпорт з cURL',
placeholder: 'Вставте сюди рядок cURL',
},
verifySSL: {
title: 'Перевірити SSL сертифікат',
warningTooltip: 'Вимкнення перевірки SSL не рекомендується для виробничих середовищ. Це слід використовувати лише в розробці або тестуванні, оскільки це робить з\'єднання вразливим до загроз безпеці, таких як атаки «людина посередині».',
},
},
code: {
inputVars: 'Вхідні змінні',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/vi-VN/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
title: 'Nhập từ cURL',
placeholder: 'Dán chuỗi cURL vào đây',
},
verifySSL: {
title: 'Xác thực chứng chỉ SSL',
warningTooltip: 'Việc vô hiệu hóa xác minh SSL không được khuyến khích cho các môi trường sản xuất. Điều này chỉ nên được sử dụng trong phát triển hoặc thử nghiệm, vì nó làm cho kết nối dễ bị tổn thương trước các mối đe dọa an ninh như cuộc tấn công man-in-the-middle.',
},
},
code: {
inputVars: 'Biến đầu vào',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/zh-Hans/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ const translation = {
title: '导入 cURL',
placeholder: '粘贴 cURL 字符串',
},
verifySSL: {
title: '验证 SSL 证书',
warningTooltip: '不建议在生产环境中禁用 SSL 验证。这仅应在开发或测试中使用,因为它会使连接容易受到诸如中间人攻击等安全威胁。',
},
},
code: {
inputVars: '输入变量',
Expand Down
4 changes: 4 additions & 0 deletions web/i18n/zh-Hant/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ const translation = {
placeholder: '在此處粘貼 cURL 字串',
title: '從 cURL 導入',
},
verifySSL: {
title: '驗證 SSL 證書',
warningTooltip: '不建議在生產環境中禁用SSL驗證。這僅應用於開發或測試,因為這樣會使連接容易受到中間人攻擊等安全威脅的威脅。',
},
},
code: {
inputVars: '輸入變量',
Expand Down
Loading