gamcoh / st-card

Streamlit component for UI cards
https://pypi.org/project/streamlit-card/
MIT License
116 stars 19 forks source link

how could i config my nginx #34

Closed HakunamatataLeo closed 4 months ago

HakunamatataLeo commented 5 months ago

image

my nginx.conf

server {
    listen       8000;
    server_name  localhost;

   location = /hsk {
         proxy_pass http://127.0.0.1:8501;
    }

    location ^~ /static {
        proxy_pass http://127.0.0.1:8501/static/;
    }

    location = /_stcore/health {
        proxy_pass http://127.0.0.1:8501/_stcore/health;
    }

  location = /_stcore/host-config {
        proxy_pass http://127.0.0.1:8501/_stcore/host-config;
    }

    location = /hsk/_stcore/health {
        proxy_pass http://127.0.0.1:8501/_stcore/health;
    }

    location = /hsk/_stcore/host-config {
        proxy_pass http://127.0.0.1:8501/_stcore/host-config;
    }

    location = /_stcore/allowed-message-origins {
        proxy_pass http://127.0.0.1:8501/_stcore/allowed-message-origins;
    }

    location = /hsk/_stcore/stream {
        proxy_pass http://127.0.0.1:8501/_stcore/stream;
        proxy_http_version 1.1;
        proxy_redirect off;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 86400;
    }

add_header Content-Security-Policy "default-src 'self' https: data: 'unsafe-inline';" always;

@gamcoh pls

gamcoh commented 5 months ago

I don't think your issue is with nginx, could you share your code please?