mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2026-07-25 21:46:08 -04:00
Embedding in an Iframe is not possible #25
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @veserai on GitHub (Apr 9, 2024).
The standard dify-web docker container allows to embed the Chatbot in an Iframe on a website.

As I needed to customize the frontend, I followed the instructions and deployed the webapp-conversations frontend on vercel.
It runs perfectly when I open the Vercel URL directly. As soon as I embed it into an Iframe, I always get the error, that the chatbot is still responding, when I try to send a second message.
Already tested:
@veserai commented on GitHub (Apr 11, 2024):
I was able to fix it on my own. The problem was: /app/compontents/index.tsx: The "oncompleted" function fails while fetching the conversations.id . Therefore the bot never reaches the state, where the "setResponsingFalse()" is set.
I rewrote the async onCompleted like this:
@taowang1993 commented on GitHub (Aug 17, 2024):
After you embed the chatbot in another website, can other people still access your web app UI?
@veserai commented on GitHub (Aug 17, 2024):
Before I fixed it -> No
After my fix -> Yes
Please make sure to have SSL activated (For example by using a reverse Proxy), otherwise many brothers will block the iFrame
@AllForNothing commented on GitHub (Dec 11, 2024):
I found the root cause of this issue: Set-Cookie is blocked by the browser


then conversations API always returns empty data without session_id cookie.
So, we can add "SameSite=None; Secure" to the session_id cookie to fix this issue (webapp-conversation\app\api\utils\common.ts)
@amine-y commented on GitHub (Aug 5, 2025):
Thanks @veserai, just an update you need to fix a typo in the function setResponsingFalse => setRespondingFalse