lundi 20 septembre 2021

Nginx cuts a part of blob data

I use nginx server to connect with my django backend. When I check in local server, everything works good. But when I use nginx server, the blob file does not arrive completely.

main.conf

server {
        listen 443 ssl http2;
    
        root /usr/share/nginx/html;
        index index.html;
    
        keepalive_timeout 200;
        keepalive_requests 100;
        send_timeout 10;
    
        autoindex_localtime on;
    
        include extra_conf/bufer.conf;
        include extra_conf/compress.conf;
        server_tokens off;
    
        add_header X-APP-VERSION $project_version;
    
        location / {
            try_files $uri $uri/ /index.html;
        }
    
        include extra_conf/hash_static.conf;
    
        location /api/ {
    
            limit_req zone=api_req_limit burst=10 nodelay;
            limit_conn api_conn_limit 10;
    
            proxy_pass http://backend-api/;
            proxy_cookie_path / /api/;
            include extra_conf/proxy_header.conf;
        }
    
    }

I splited my main config file and I took simple elements out of bounds. I think they do not affect, but I applied them too. buffer.conf

client_body_buffer_size 50M;
client_header_buffer_size 2k;
large_client_header_buffers 4 8k;
client_max_body_size 100M;

compress.conf

gzip on;
gzip_min_length 100;
gzip_comp_level 4;
gzip_proxied any;
gzip_vary on;
gzip_types application/atom+xml;
gzip_types application/javascript;
gzip_types application/json;
gzip_types application/rss+xml;
gzip_types application/vnd.ms-fontobject;
gzip_types application/x-font-ttf;
gzip_types application/x-web-app-manifest+json;
gzip_types application/xhtml+xml;
gzip_types application/xml;
gzip_types font/opentype;
gzip_types image/svg+xml;
gzip_types image/x-icon;
gzip_types text/css;
gzip_types text/plain;
gzip_types text/x-component;
gzip_disable "msie6";

Do you have any ideas ?

Aucun commentaire:

Enregistrer un commentaire