ui icon indicating copy to clipboard operation
ui copied to clipboard

UI cannot be displayed in IFrame due to CORS issues

Open getarun opened this issue 2 years ago • 0 comments

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

  1. Setup temporal with docker environment. Set the corresponding environment variables like so in docker-compose.yml
[...]
temporal-ui:
  container_name: temporal-ui
  depends_on:
    - temporal
  environment:
    - TEMPORAL_ADDRESS=temporal:7233
    - TEMPORAL_CORS_ORIGINS=*
  image: temporalio/ui:${TEMPORAL_UI_VERSION}
  networks:
    - temporal-network
  ports:
    - 8080:8080
[...]
  1. Access the exposed port via an iframe.
  2. IFrame reports blocked content.

Specifications

  • Version: TEMPORAL_VERSION=1.20.2 TEMPORAL_UI_VERSION=2.13.3
  • Platform: Linux / Google Kubernetes Engine

Context

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.

getarun avatar May 05 '23 13:05 getarun