After some back and forth I have been able to load the javascript and css files from Streamlit.
However, the application will not load fully and displays “Please Wait”. The cause of which seems to be that 404s are returned for the get requests “/_stcore/health” and “/_stcore/allowed_message_origins”
I am hosting on AWS EC2 (as a proof of concept, will use containers when this this works)
I am behind a nginx proxy. This functions well for a simple flask server, and it does show the streamlit loading page, so connection to streamlit seems to work well
I suspect it might be a SSL issue, as nginx is currently listening on port 80. In AWS I have configured the ALB to use port 443 for ssl.
Cool to know you are working on a similar setup.
I’m still working on it, but seem to have a sort-of (though slow and unreliable and not secure) proof of concept up and running.
I ran into so many issues that I am not sure again what fixed what, and probably half of these changes are not even necessary, but here are some things I see that are different than my nginx and config.toml above:
I changed the name of the url that streamlit runs on in config.toml and then added the same url in nginx
I have added the allowed-messages and health and forwarded them to the port
I also (tried to) turn of some of the CSP policies. Of course, my plan is to add this back on when this fully works
server {
listen 80;
listen [::]:80;
server_name url-that-your-service-will-run-on-example.com www.url-that-your-service-will-run-on-example.com
Hi @pim - I’m running into the same issue using an AWS ELB to direct traffic based on a URL path. Did you guys come up with a solution? @Hu-Wentao, I don’t understand how websockets are related here - these are http/2 request, but not websocket requests. Can you elaborate on your fix pls?
Thanks, Mark
Could you elaborate a bit more on how you solved this? We still have the same error. We are trying to have path based routing from a ELB to a streamlit app running on a subpath on fargate service. We still get a white screen and see a 404 error in the dev-console. We tried to do add --server.baseUrlPath=myapp, where then myapp is the subpath of our routing. e.g. url.com/myapp.
How did you do this?
Kudos to @pim ,
I got mine working behind url subpath folder. Only minor change is change config.toml as follow :
[server]
port=8501
runOnSave=true
baseUrlPath="webapp" #Change path here to same on nginx
[logger]
level="debug"
messageFormat = "%(asctime)s %(message)s"
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.