Bugfix - Add x-forwarded-proto as source for http protocol for base url and add base url field to ChatflowTool (#2592)

This commit is contained in:
Daniel D'Abate
2024-06-07 13:04:25 +02:00
committed by GitHub
parent cb93d9d557
commit 34251fa336
2 changed files with 15 additions and 3 deletions
+3 -1
View File
@@ -54,7 +54,9 @@ export const utilBuildChatflow = async (req: Request, socketIO?: Server, isInter
try {
const appServer = getRunningExpressApp()
const chatflowid = req.params.id
const baseURL = `${req.protocol}://${req.get('host')}`
const httpProtocol = req.get('x-forwarded-proto') || req.protocol
const baseURL = `${httpProtocol}://${req.get('host')}`
let incomingInput: IncomingInput = req.body
let nodeToExecuteData: INodeData