NginxProxyManager / NginxProxyManager/nginx-proxy-manager

Can NPM Use the Lua Module?

Open
#5,674 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
34.2k
Forks
3.9k
Avg merge
21h 12m
Merged PRs (30d)
20

Description

I learned you can actually configure nginx logging to include entire HTTP request/response bodies using third party modules. With that said, does NPM include the Lua module so you can use commands like lua_need_request_body

This is the excerpt I'm trying to add so my logs have full HTTP bodies in them

error_log /data/logs/verbose_error_logs debug;
access_log /data/logs/verbose_access_logs debug;
log_format verbose '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';

lua_need_request_body on;

set $resp_body "";
body_filter_by_lua '
local resp_body = string.sub(ngx.arg[1], 1, 1000)
ngx.ctx.buffered = (ngx.ctx.buffered or "") .. resp_body
if ngx.arg[2] then
ngx.var.resp_body = ngx.ctx.buffered
end
';

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Check the repository's Docker/Nginx build configuration and module list first, then verify whether lua_need_request_body and body_filter_by_lua are available. Done means establishing whether NPM can support the supplied logging configuration and documenting the required module or configuration path.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.