(Note: I'm Head of Developer Relations at Streamlit)
The easiest way to have a secure Streamlit app would be to use Streamlit Cloud, which is https by default:
If you want to use some other combination of technologies for hosting, we've created a Deployment Guide to aggregate the best answers from the community:
https://discuss.streamlit.io/t/streamlit-deployment-guide-wi...
Depending on what you are trying to do, I suspect you're looking for using Apache2 or nginx as a proxy:
https://discuss.streamlit.io/t/configuring-apache-2-4-for-pr...