January 20, 2023 04:55PM

I’m working on an Nginx module that adds a handler at the REWRITE phase.
The purpose of this module is to parse the request body, extract some fields from it, and set variables based on those values.
The request should then proceed to be processed as usual, and the values of those fields are then logged.

I put the code for a trimmed-down version of this module in a gist (see end of message).

That said - I’m running into an issue where including this module in my Nginx config causes logs not to be emitted anymore.
As soon as I remove the module, logs come back. Everything else behaves as expected, other modules run fine and I get the expected response from the upstream.

Was wondering if anyone would be willing to take a look at the code (it’s pretty short) in case they spot anything I’m doing wrong.
It seems like the issue stems from calling: ngx_http_read_client_request_body.

Link to github gist with code sample: https://gist.github.com/rikonor/b894f7fab42274ffc4a3db2b4799d26d

Thanks so much for any help you can offer!
Subject Author Posted

Nginx handler module disables logs

boop January 20, 2023 04:55PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready