Ctrl K
ComunidadGuías…

docker/nginx/ragflow.conf

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
server {
    listen 80;
    server_name _;
    root /ragflow/web/dist;

    gzip on;
    gzip_min_length 1k;
    gzip_comp_level 9;
    gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.";

    location ~ ^/api/v1/admin {
        proxy_pass http://127.0.0.1:9381;
        include proxy.conf;
    }

    location ~ ^/api/v1 {
        proxy_pass http://127.0.0.1:9380;
        include proxy.conf;
    }


    location / {
        index index.html;
        try_files $uri $uri/ /index.html;
        # The entry document must never come from cache: a stale index.html
        # references hashed bundles that no longer exist after an image
        # upgrade.
        add_header Cache-Control "no-store";
    }

    # Direct navigation to the chunk routes must reach the SPA fallback:
    # without this block those paths match the hashed-asset location below,
    # and a missing file answers 404 instead of the app shell. Regex
    # locations are matched in order, so this must come first.
    location ~ ^/chunk/(parsed/chunks|chunk/[^/]+|result/[^/]+)$ {
        try_files $uri $uri/ /index.html;
    }

    # Hashed bundles are immutable, so they may cache for a year, and a stale
    # reference after an upgrade must answer 404 instead of the SPA fallback
    # HTML, which a dynamic import() cannot parse.
    location ~ ^/(chunk|entry|assets)/ {
        add_header Cache-Control "public, max-age=31536000, immutable";
        access_log off;
        try_files $uri =404;
    }
}