I have a golang app behind nginx and behind Cloudflare which serves large html files but I've noticed that for GET requests, after about 900KB size the html is trucated and the button of the page is not displayed.
The problem exists in both Firefox and Chrome. In Chrome console I get:
net::ERR_HTTP2_PROTOCOL_ERROR 200
Here is my nginx.conf relevant part
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 8m;
large_client_header_buffers 2 1k;
include /etc/nginx/mime.types;
default_type application/octet-stream;
client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 15;
send_timeout 10;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 9;
gzip_buffers 32 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
I increased gzip_buffers
from 16 4k
to 32 8k
and even disabpled gzip compression but these did not solve the problem.
Appreciate your hints to resolve this.