I’m working on a project where I have a Flask web app running as a web service. I want to add a feature that allows users to upload their Streamlit apps (Python scripts) and run them within my Flask app. However, I’ve run into an issue: the Streamlit apps are hosted on HTTP, not HTTPS, which is a security concern.
Here’s my plan:
- Users upload a streamlit.py script.
- My Flask app allocates a part of its functionality to run the Streamlit app.
- The Streamlit app currently runs over HTTP, but I want it to run over HTTPS.
I’ve heard that Nginx can help with enabling HTTPS and that I can use an iframe to embed the Streamlit app back into my Flask app.
- How can I configure Nginx to make the embedded Streamlit app use HTTPS?
- Are there any security concerns or best practices I should be aware of when doing this?
- Do you have any suggestions for alternative approaches or tools that might simplify this process?
Any advice or guidance on this issue would be greatly appreciated. Thanks in advance for your help!