Unable to set the enableCORS configuration to false
See original GitHub issueSummary
I’m running my streamlit app inside a docker container and using nginx inside a Digital Ocean box to redirect traffic arriving to my.url/crime to the port I’ve mapped for the container, however, the screen hangs on ‘Please Wait’. I’ve done some research and apparently I need to set the config file enableCORS variable to false. I’ve tried changing setting it to false with the following:
- Dockerfile CMD is streamlit run --server.enableCORS false app.py
- Dockerfile setting environmental variable to: – ENV STREAMLIT_CONFIG_SERVER_ENABLE_CORS=false – ENV STREAMLIT_CONFIG_SERVER_ENABLECORS=false
However, when I run streamlit config show
inside the container, enableCORS is always true
Steps to reproduce
The project is in the following link: https://github.com/dsharpc/StreamlitCrime
And the Dockerfile is this: https://github.com/dsharpc/StreamlitCrime/blob/master/Dockerfile
When the image is run using any of the three variations to set the enableCORS variable to false, the streamlit config show
command keeps showing it as true.
Expected behavior:
enableCORS shows as false.
# Enables support for Cross-Origin Request Sharing, for added security.
# Default: true
enableCORS = false
Actual behavior:
enableCORS still shows as true
# Enables support for Cross-Origin Request Sharing, for added security.
# Default: true
enableCORS = true
Is this a regression?
First time I’ve tried it
Debug info
- Streamlit version: 0.51.0
- Python version: 3.6.8
- Using Docker
- OS version: Ubuntu 18.04
- Browser version:
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Can you try to run this script and see what you see?
I also tried this and seems fine:
This may be unrelated, but may help. Did you configure Nginx for Websockets? You need a config like this one: https://gist.github.com/monchier/f2e7e7eff4324555cfc07a7359a1a631
Can you attach what you see in the network tab of Google Chrome Tools?
Best, Matteo
same 😦 and with
enableXsrfProtection