Forum Discussion
Gzip - Http request
Hello
I have a client app that send JSON requests to the server pool.
The requests are compressed with GZIP and I'm sending a Content-Encoding: gzip header.
The ASM is not uncompressing the GZIP in the request.I know it can compress/uncompress responses, but I haven't seen anywhere where I can configure it to uncompress requests
Without this functionality, I will have to drop gzip compression, which will greatly impact my app's performance. It seems to defy logic that there isn't such a functionality.
- JGCumulonimbus
Actually you can enable the compression functionality for request in an irule. See: https://devcentral.f5.com/wiki/iRules.COMPRESS__enable.ashx.
- Vijith_182946Cirrostratus
hope this helps- https://support.f5.com/csp/article/K15434
- Shuki_griba_304Nimbostratus
Thanks Vijith and Jie for your reply.
The problem is that i accept all(include the first one) the requests from the client with gzip body.
The ASM/F5 didn't decompress the requsts and block them with false positive violations.
All the articles spoke about Http response compression.
I tried to add in the Irule HTTP::compress request, but the results are same, Decompress :(
Any advice ?
Thanks
- JGCumulonimbus
As a workaround, you can set up a second virtual server with no compression support configured, and pass the traffic of your first virtual server to it. The 2nd virtual server will then be able to pick up any security vulnerabilities through the ASM. The performance will not drop that much than having no compression for your client traffic altogether.
- Walter_KacynskiCirrostratus
I posted this over in: https://devcentral.f5.com/questions/uncompress-gzip-request-with-json
There is an iRule DECOMPRESS::enable request that will accomplish this goal. I opened a support case and the engineer gave me a solution. I tested it with an LTM policy or here is the iRule:
when HTTP_REQUEST { log local0. "**HTTP Request Received**" if { [HTTP::header "Content-Encoding"] contains "gzip"} { DECOMPRESS::enable request log local0. "Content-Encoding is GZIP, DECOMPRESS" } }
I verified that content is uncompressed.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com