Streamlit 0.72.0 behind NGINX connecting forever

I was following the troubleshooting guide

but the suggestions did not help. I am running streamlit on http//localhost:8501 and my nginx config looks like:
  location /app/ {
    #client_max_body_size    10G;
    proxy_pass       http://localhost:8501;
    rewrite ^/app/(.*) /$1 break;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_read_timeout 86400;

I tried running streamlit with both --server.enableCORS=false and --server.enableXsrfProtection=false

When I load the app I reach at streamlit, but it is connecting forever and “connecting” is blinking. Chrome devtools show:

DevTools failed to load SourceMap: Could not load content for HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

The troubleshooting guide mentions:

If this fixes your issue, **you should re-enable CORS protection** and then set browser.serverPortandbrowser.serverAddress to the URL and port of your Streamlit app.

Which I tried as well.

I also tried various combination of the .streamlit/config.toml file:

#baseUrlPath = "/app/"

serverAddress = "localhost"

Hi @Soren,

What version of Streamlit are you using? The link you provided take me to a pretty old version of the documentation.

You say you reach the stremalit app but it wont connect? The DevTools error you provided shows a https link but when I click the link it gives me a 404 page not found error. Is this the correct url?

Some code snippets/screen shots may help us sort this out!