Title: How to add a URL prefix to internal requests of the embedded iframe? #28296
Replies: 4 comments 3 replies
-
|
There isn’t a built-in config or environment variable in Dify that automatically prepends a URL prefix (like If you need to change the prefix after deployment, you must rebuild the frontend with the new settings—runtime changes to these variables aren’t supported. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
@dosu how to changde environment variables and rebuild the frontend |
Beta Was this translation helpful? Give feedback.
-
|
@dosu using Docker, how to set the environment variables in Docker build or runtime environment, then rebuild the Docker image |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
Content
Hi there,
I'm embedding a Dify chatbot into my web application using an iframe, and the iframe's source is set to a URL like https://xxx/yyy/chatbot/[ID].
However, I noticed that all internal API requests made by the iframe (e.g., to endpoints like /api/chat or /api/messages) are missing the /yyy/ prefix. This causes the requests to fail because they’re sent to https://xxx/api/chat instead of https://xxx/yyy/api/chat.
Is there a built-in configuration, environment variable, or recommended approach to automatically prepend the /yyy/ prefix to all internal requests made by the embedded iframe?
Any guidance would be greatly appreciated!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions