Spaces:
Running
Running
File size: 1,852 Bytes
1462647 66a32ca 1462647 66a32ca 1462647 66a32ca 1462647 3620617 1462647 3620617 66a32ca 1462647 3620617 1462647 66a32ca 3620617 1462647 66a32ca 1462647 66a32ca 1462647 3620617 1462647 66a32ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
worker_processes 1;
daemon off;
pid /tmp/nginx.pid;
error_log /tmp/error.log;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /tmp/access.log;
sendfile on;
keepalive_timeout 65;
client_max_body_size 100M;
upstream main_backend {
server 127.0.0.1:7862;
}
upstream preview_backend {
server 127.0.0.1:7861;
}
server {
listen 7860 default_server;
server_name _;
# Serve manifest.json directly
location = /manifest.json {
root /app;
add_header Content-Type "application/manifest+json";
try_files $uri =404;
}
# Handle missing fallback font files gracefully
location ~ ^/static/fonts/(ui-sans-serif|system-ui)/ {
access_log off;
return 204;
}
location /preview/ {
rewrite /preview/(.*) /$1 break;
proxy_pass http://preview_backend;
proxy_buffering off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
proxy_pass http://main_backend;
proxy_buffering off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}
|