# Solved! body\_filter\_by\_lua issues

**URL:** <https://www.ruby-forum.com/t/solved-body-filter-by-lua-issues/224876>\
**Category:** NGINX\
**Created:** [November 29, 2012, 12:15pm UTC](https://www.ruby-forum.com/t/solved-body-filter-by-lua-issues/224876 "2012-11-29T12:15:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 29, 2012, 12:15pm UTC](https://www.ruby-forum.com/t/solved-body-filter-by-lua-issues/224876/1 "2012-11-29T12:15:09Z")

</div>

Hi all

I got my modifying reverse proxy working by adding

proxy\_set\_header Accept-Encoding ‘’;

before my body\_filter\_by\_lua code block. This way I force the proxy to  
give me uncompressed data, and then the lua code works perfectly. I’ll  
add a gzip on; at the end, to pass the data to the browser compressed.

Thanks

Bart

* * *

From: removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid] on behalf of  
Bart van Deenen [removed\_email\_address@domain.invalid]  
Sent: Thursday, November 29, 2012 11:37 AM  
To: removed\_email\_address@domain.invalid  
Subject: does body\_filter\_by\_lua get called when proxied server returns  
gzipped data?

Hi

I posted the recent thread on problems with body\_filter\_by\_lua, and I  
think it finally has to do with the fact that my browser allows gzipped  
data, and the server in my example returns gzipped data. I only found  
out using wireshark.

Could it be that the gzipped data don’t even reach the lua code?

Thanks

Bart
