mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Chore/Prevent invalid http redirect (#4990)
prevent invalid http redirect
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { z } from 'zod'
|
||||
import fetch from 'node-fetch'
|
||||
import { DynamicStructuredTool } from '../OpenAPIToolkit/core'
|
||||
import { checkDenyList } from '../../../src/httpSecurity'
|
||||
import { secureFetch } from '../../../src/httpSecurity'
|
||||
|
||||
export const desc = `Use this when you need to execute a GET request to get data from a website.`
|
||||
|
||||
@@ -166,11 +165,8 @@ export class RequestsGetTool extends DynamicStructuredTool {
|
||||
finalUrl = url.toString()
|
||||
}
|
||||
|
||||
// Check if URL is allowed by security policy
|
||||
await checkDenyList(finalUrl)
|
||||
|
||||
try {
|
||||
const res = await fetch(finalUrl, {
|
||||
const res = await secureFetch(finalUrl, {
|
||||
headers: requestHeaders
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user