Open dhiaayachi opened 2 months ago
Thank you for reporting this issue.
The Temporal UI currently does not support CORS for iframes with the *
wildcard.
You can work around this by setting the TEMPORAL_CORS_ORIGINS
environment variable to the specific origin of your dashboard application. For example, if your dashboard is running at http://localhost:3000
, you would set TEMPORAL_CORS_ORIGINS
to http://localhost:3000
.
Please let me know if you have any other questions.
Thank you for reporting this issue.
We are aware of this issue and are working on a fix. Currently, CORS is set to "localhost" by default. Temporal UI does not support the CORS wildcard *
because that can be a security risk.
To work around this, you can configure your Temporal UI to allow CORS requests from specific origins instead of *
. You can achieve this by:
TEMPORAL_CORS_ORIGINS
to a comma-separated list of allowed origins in your docker-compose.yml file.corsOrigins
setting in your UI configuration file, which is described in detail here. We hope this workaround helps until the issue is resolved.
Thank you for reporting this issue. Unfortunately, the current Temporal UI does not support being embedded in an iframe when TEMPORAL_CORS_ORIGINS
is set to *
. This is because the browser prevents cross-origin iframes from accessing resources from different origins, and the Temporal UI relies on accessing resources from its own origin.
A workaround for this is to use a reverse proxy like Nginx to route requests to the Temporal UI from your dashboard. Configure the reverse proxy to allow cross-origin requests from your dashboard, and then embed the Temporal UI in an iframe within your dashboard.
Here's a simple example of how you could configure a reverse proxy with Nginx:
upstream temporal-ui {
server temporal-ui:8080;
}
server {
listen 80;
location /temporal-ui/ {
proxy_pass http://temporal-ui;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods GET, POST, PUT, DELETE, OPTIONS;
add_header Access-Control-Allow-Headers *;
}
}
Please let us know if you have any further questions.
Expected Behavior
Temporal UI should be displayed in an iframe of another application when CORS is set to '*'.
Actual Behavior
Content is blocked. Iframe is empty
Steps to Reproduce the Problem
Specifications
I want to use the UI as part of a dashboard beacause here I have the benefit of not having the user authenticate in temporal, but beforehand in the dashboard. Therefor I want to display the UI inside it, hence the IFrame.
Thank you for sharing this great piece of software. Suggestions appreciated.