I have an application on an aws ec2 virtual machine. if I connect to streamlit using the ip address http://18.222.39.57:8501/ it works fine. however, if I use the server name ec2-18-222-39-57.us-east-2.compute.amazonaws.com:8501, the app starts but stalls at the “please wait” state. So the server is found, but streamlit does not start correctly. Is there anything I need to consider to use the server name instead of the address?
Hey @godot63,
It looks like a CORS problem, did you try configuring browser.serverAddress
with ec2-18-222-39-57.us-east-2.compute.amazonaws.com
? or even disabling CORS using server.enableCORS
?
sorry for the long wait @arraydude, I got sidetracked with other stuff. Now the app is ready but I have not solved my problem yet. I was able to change the setting on the localhost in the config.toml file. and it shows up when I run streamlit config show.
[server]
port = 8501
enableCORS = false
However I need to apply it on my AWS AMI machine. Where do I find this file?
No worries about it @godot63, The config.toml file should be always located at ~/.streamlit/ , but you could also pass the configs through the CLI as it is shown here.
So for instance it would be like this:
streamlit run examples/example.py --server.port 8501 --server.enableCORS False
If you want to check all the options:
streamlit run --help
or this, to check the applied ones
streamlit config show
Perfect! It worked like a charm. thanks so much, you are my hero