Skip to content

Just a quick workaround to access your Streamlit apps from inside GitHub's Codespaces

Notifications You must be signed in to change notification settings

romankehr/streamlit-codespaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

PROBLEM

If you try to start Streamlit in a GitHub Codespace with

streamlit run YourFile.py

and open the provided URL, you'll be stuck at

alt text

Workaround

Start Streamlit with

streamlit run YourFile.py --enableCORS=false --enableXsrfProtection=false

or add the following lines to your .streamlit\config.toml

[server]
enableCORS = false
enableXsrfProtection = false

After this, you can access your streamlit app in the browser from inside the codespace without a problem.

WARNING: You might want to set these back to their default values true or remove the lines before publishing.

About

Just a quick workaround to access your Streamlit apps from inside GitHub's Codespaces

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published