fix: Update host_url in getWidgetCode function (#4894)

Refactor: Update host_url in getWidgetCode function
This commit is contained in:
anovazzi1 2024-11-27 17:23:24 -03:00 • committed by GitHub
commit 49079098b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,7 +15,7 @@ export default function getWidgetCode({
<langflow-chat <langflow-chat
window_title="${flowName}" window_title="${flowName}"
flow_id="${flowId}" flow_id="${flowId}"
host_url="http://localhost:7860"${ host_url="${window.location.protocol}//${window.location.host}"${
!isAuth !isAuth
? ` ? `
api_key="..."` api_key="..."`