Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Force chunk transfer enconding in NGINX for proxied responses

$
0
0
I've got an upstream that sends back responses in "applicaion/json" format. NGINX is used as a reverse proxy in my project. However, I have a hard requirement that client applications only accept the chunked encoding response. And hence somehow I need to transform my "Content-Length: XXXX" responses to "Transfer-Encoding: chunked".

Can NGINX somehow do it automatically? It is really irrelevant how chunk sizes are divided, as long as they are simply chunked. Updating client applications is unfortunately not an option, but also modifying upstream backend API would be very problematic as well. Just NGINX could help here.

I've tried playing with the following parameters in the "location" config, but in vane

prox_buffering off;
chunked_transfer_encoding on;
proxy_http_version 1.1;

Appreciate any help!

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>