From dfd1e3bcc36f0b4714fffe91df72ab1759ba43d0 Mon Sep 17 00:00:00 2001 From: "Gian P." <63517877+gkp1@users.noreply.github.com> Date: Mon, 19 Jan 2026 05:38:13 -0300 Subject: [PATCH] Document Cloudflare proxy upload speed optimization Added instructions for fixing upload speed and big uploads not working in general when using Cloudflare proxy with nginx. Signed-off-by: Gian P. <63517877+gkp1@users.noreply.github.com> --- contrib/nginx/copyparty.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contrib/nginx/copyparty.conf b/contrib/nginx/copyparty.conf index 440e22c3..12a7b4d4 100644 --- a/contrib/nginx/copyparty.conf +++ b/contrib/nginx/copyparty.conf @@ -32,7 +32,18 @@ # (curl -s https://www.cloudflare.com/ips-v{4,6} | sed 's/^/allow /; s/$/;/'; echo; echo "deny all;") > /etc/nginx/cloudflare-only.conf # # and then enable it below by uncommenting the cloudflare-only.conf line +# # +# ** Fix upload speed for Cloudflare proxy: from <1MBps to >40MBps ** +# If using cloudflare proxy, replace: +# proxy_set_header Connection "Keep-Alive"; +# with: +# proxy_set_header Connection ""; +# and just make sure you also have: proxy_http_version 1.1; +# +# Reason: Clears client "Connection" headers so Nginx can manage its own +# persistent pool via the "upstream" keepalive. Prevents Cloudflare/Client +# close-signals from killing the backend pipe, drastically boosting speed. # ======================================================================