A webhook receiver I built a few years ago always worked the same way: nginx took the connection, nginx forwarded the body, and the application decided whether the payload was junk. nginx 1.31.5 adds a module that lets nginx make that decision itself, by reading fields out of the JSON body before the request ever reaches a location block. I wanted to know what that was actually worth, not just what the changelog implied.
The module is ngx_http_json_module , built with --with-http_json_module (it's compiled into the official Docker image, but not into Ubuntu's 24.04 nginx apt package, which still ships 1.24.0). It adds one directive that matters, json_set , plus a depth limit.…