How to use Streamlit with Nginx?

@tokestermw Hi could you share some tips that made it work for you? My app is also encountering serious slow downs with Nginx using the same configs discussed here. WebSocket is closed before the connection is established
When I access the server directly using IP:8501, the app loads instantly but accessing through domain name and Nginx just keeps the app on Connecting... Please wait