qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.03k stars 3.95k forks source link

Unable to select more than 133 torrents in Web UI to delete with Reverse Proxy on nginx (possible solutions offered) #19421

Open Rouzax opened 1 year ago

Rouzax commented 1 year ago

qBittorrent & operating system versions

qBittorent x64 4.5.4

Qt: 5.15.10
Libtorrent: 1.2.19.0
Boost: 1.82.0
OpenSSL: 1.1.1u
zlib: 1.2.13

What is the problem?

Selecting 133 torrent in the Web UI and pressing delete will instantly show delete dialog, selecting 134, and it will show the dialog but keeps loading when connecting through Reverse Proxy with nginx Have tested on Firefox and Chrome In the direct connected webgui and Windows GUI it works normally

Web https://github.com/qbittorrent/qBittorrent/assets/4103090/ec43b54d-c29c-4b4b-916f-e9b669c30bdf

Steps to reproduce

No response

Additional context

NGINX config

domain.conf

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name domain.com;

    # SSL
    ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/domain.com/chain.pem;

    # security
    include nginxconfig.io/security.conf;

    # logging
    access_log /var/log/nginx/domain.com.access.log;
    error_log /var/log/nginx/domain.com.error.log warn;

    # reverse proxy
    location / {
        proxy_pass http://192.168.2.11:8080;
        include nginxconfig.io/proxy.conf;
    }

    # additional config
    include nginxconfig.io/general.conf;
}

# HTTP redirect
server {
    listen 80;
    listen [::]:80;

    server_name domain.com;

    include nginxconfig.io/letsencrypt.conf;

    location / {
        return 301 https://domain.com$request_uri;
    }
}

security.conf

# security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
# add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self'; img-src 'self' data:; connect-src 'self'; font-src 'self'; object-src 'none'; media-src 'self'; form-action 'self'; frame-ancestors 'self';" always;
# add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;

# . files
location ~ /\.(?!well-known) {
    deny all;
}

proxy.conf

proxy_http_version  1.1;
proxy_cache_bypass  $http_upgrade;
http2_push_preload      on;

proxy_set_header Upgrade        $http_upgrade;
proxy_set_header Connection     $http_connection;
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_set_header X-Forwarded-Host   $host;
proxy_set_header X-Forwarded-Port   $server_port;

proxy_buffers 4 256k;
proxy_buffer_size 128k; 
proxy_busy_buffers_size 256k;

proxy_send_timeout 180s;
proxy_read_timeout 180s;

General.conf

# gzip
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;

Log(s) & preferences file(s)

No response

MaticBabnik commented 1 year ago

Trying to delete 900 torrents on my nginx config gets me image

You can fix this by adding this to your config

client_header_buffer_size 64k;
large_client_header_buffers 4 64k;

(maybe adjust the size)

Another possible solution would be to use a POST request when deleting, so the torrent hashes go into the body instead of the head.