Welcome! Log In Create A New Profile


gzip compression for upstream requests

October 10, 2019 10:14AM

Does nginx support compression of proxied upstream requests (not

I have configuration below and what I see is that responses are sent
uncompressed to upstream server (and I'm getting compressed responses from
upstream, as upstream is also nginx with gzip compression enabled).

upstream someupstream {
server someserver:3333;
keepalive 32;

server {
listen 3333;
gzip on;
gzip_proxied any;
gzip_types *;
gzip_min_length 10;
gzip_vary on;
gzip_http_version 1.1;

location / {
proxy_pass http://someupstream;
proxy_read_timeout 84600s;
proxy_send_timeout 84600s;
proxy_http_version 1.1;
proxy_set_header Connection "";

when I do curl --data-binary @file.txt http://localhost:3333/zxc

I can see with tcpdump that following data is sent to upstream server

POST /zxc HTTP/1.1
Host: someupstream
Content-Length: 4301
Accept: */*
Content-Type: application/x-www-form-urlencoded

<content of the file here>

nginx mailing list
Subject Author Posted

gzip compression for upstream requests

xdmitry October 10, 2019 10:14AM

Re: gzip compression for upstream requests

Maxim Dounin October 10, 2019 11:06AM

Re: gzip compression for upstream requests

xdmitry October 10, 2019 11:32AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 85
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready