I am trying to do a reverse proxy for my Streamlit app. Below is my configuration file. It’s giving me a websocket error. Do you have any suggestions?
I also set up the base URL in the config.toml file.
[server] baseUrlPath = “jarvis”
My nginx config file:
location /jarvis { proxy_pass http://abc.com:8501/jarvis; }
location /jarvis/static {
proxy_pass http://abc.com:8501/jarvis/static/; } location /jarvis/healthz { proxy_pass http://abc.com:8501/jarvis/healthz; } location /jarvis/vendor { proxy_pass http://abc.com:8501/jarvis/vendor; } location /jarvis/stream { proxy_pass http://abc.com:8501/jarvis/stream; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_buffering off; proxy_http_version 1.1; # Also requires websocket: proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_read_timeout 86400; } }