Hi,
I have the following configuration on nginx, which is my reverse proxy, to access my streamlit application, however when I try to access the app in a port different from 80 the page still loading and the application doesn’t load.
Looking at the browser log, I receive the error below:
main.cc5b8325.js:2 WebSocket connection to ‘ws://10.242.0.16:8080/admin/_stcore/stream’ failed:
in the nginx I see the error bellow:
“GET /admin/_stcore/stream HTTP/1.1” 403 35 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36” “-”
Nginx configuration:
server {
listen 80;
listen [::]:80;
listen 8080;
server_name _;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location /admin/ {
proxy_pass http://localhost:8501/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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_read_timeout 86400;
}
}