You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i run a docker compose up -d and visit http://localhost:8080/atlas/ the Atlas client initialized but will fail with a Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8081/WebAPI/notifications?hide_statuses=. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing) Error message in the console.
What I have tried so far?
all reasonable combinations of the env var settings
(I actually dont know if it was parsed. There was no "settings.xml" in the logs. As i Python dev, I am very bad at interpreting Java/Springboot/ApacheShiro logs. i always experience them as very confusing :D )
Disable CORS it via JAVA_OPTS with JAVA_OPTS=-Xmx4g -Dsecurity.cors.enabled=false -Dsecurity.origin=*
I am at a point where i feel stupid. Am i doing it wrong or is it just not possible with the docker image (if yes, why? Any workarounds?)
I am aware of the possibility of building the image locally with a static config. I haven't tried that yet. I want to have a very simple setup for my colleagues. Also, in my view, this defeats the purpose of a docker images (if we need to rebuild the image to reconfigure the runtime config. )
I appreciate any hints 💓
The text was updated successfully, but these errors were encountered:
motey
changed the title
Disabling CORS with the docker image
Configuring CORS within the docker image not possible?
Feb 19, 2025
motey
changed the title
Configuring CORS within the docker image not possible?
Configuration of CORS within the docker image not possible?
Feb 19, 2025
Hey there, i need to provide a setup to run a local test instance of Atlas and the WebAPI for my colleagues.
All seems straight forward thanks to the great documentation around OHDSI 💟
But i am stuck at disabling CORS in the ohdsi/webapi docker image.
This is my
docker-compose.yml
Just for completeness also the
.env
fileWhen i run a
docker compose up -d
and visit http://localhost:8080/atlas/ the Atlas client initialized but will fail with aCross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8081/WebAPI/notifications?hide_statuses=. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)
Error message in the console.What I have tried so far?
I tried it with quotes, no quotes and env var names in upper case and lower case
/var/lib/ohdsi/webapi/WebAPIConfig
(I actually dont know if it was parsed. There was no "settings.xml" in the logs. As i Python dev, I am very bad at interpreting Java/Springboot/ApacheShiro logs. i always experience them as very confusing :D )
JAVA_OPTS=-Xmx4g -Dsecurity.cors.enabled=false -Dsecurity.origin=*
I am at a point where i feel stupid. Am i doing it wrong or is it just not possible with the docker image (if yes, why? Any workarounds?)
I am aware of the possibility of building the image locally with a static config. I haven't tried that yet. I want to have a very simple setup for my colleagues. Also, in my view, this defeats the purpose of a docker images (if we need to rebuild the image to reconfigure the runtime config. )
I appreciate any hints 💓
The text was updated successfully, but these errors were encountered: