2

I have Nginx setup as a reverse proxy between the world and my app, and it's successfully gzipping the proxied responses of GET requests with this general config:

gzip on;
gzip_min_length 0;
gzip_proxied any;
gzip_buffers 16 8k;
gzip_types application/json text/plain;
proxy_set_header Connection "";
proxy_http_version 1.1;

The browser sends the POST with seemingly the right headers:

Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate

However in the response header there's no Content-Encoding even thought it has Content-Type: application/json;charset=UTF-8

Can Nginx gzip the HTTP POST Response?

Josh Z
  • 21
  • 1
  • Did you find a solution to this? – d.moncada Aug 27 '18 at 03:41
  • I did not, in the end I decided to compress the response upstream of Nginx where it's generated. I didn't pursue trying to chase down if this is considered a bug in Nginx or not. – Josh Z Sep 01 '18 at 03:06
  • I've been running into this error too. Maybe it's a bug in nginx, I'm going to update nginx and see if that fixes it. – k26dr Feb 17 '20 at 18:56
  • Updating nginx to 1.17 from 1.14 did not fix this. – k26dr Feb 17 '20 at 19:26

0 Answers0