First of all, I server temporal ui under a sub path, following the directions here:
It works fine for the viewing part. But when I tried to terminate a workflow, the operation failed with a message:
“missing csrf token in request header” .
I’ve submitted an issue to ui-server project:
But still I want to know if there is a quick workaround.
Thank you, I am not able to reproduce this.
I have created the docker image
docker build --build-arg TEMPORAL_PUBLIC_PATH=/custom-path -t temporal-ui-public-path .
And to run temporal with this UI I have changed the
temporal-ui from this docker compose
Terminating workflows from the UI works for me.
how are you starting the UI?
I see that there is an open issue in the UI repo related to terminating workflows, but the error message is different, do you think it could be related? An error occurred while terminating workflow · Issue #793 · temporalio/ui · GitHub
I deploy temporal server&ui on k8s, too.
Here are my deployment yaml config:
- name: temporal-web
- name: LANG
- name: TEMPORAL_ADDRESS
- name: TEMPORAL_CORS_ORIGINS
- name: TEMPORAL_PUBLIC_PATH
- containerPort: 8080
Is there any relation to the ENV config TEMPORAL_CORS_ORIGINS?
I just found it worked fine if I visit my ui through localhost instead of a public IP .
not sure about that. Let me ask internally!
Hi @whitecrow ,
You have to set TEMPORAL_CORS_ORIGINS to the same url that you will be terminating from. (I guess the public IP)
Let me know if it works.
I tried but it did not work.
The official image works fine with TEMPORAL_CORS_ORIGINS unchanged. So I think this problem is related to the subpath mechanism.