From 3ab34aeea7d6d141d523d5b698f44265c0623b9b Mon Sep 17 00:00:00 2001 From: db123-test Date: Mon, 4 May 2026 16:08:11 +0330 Subject: [PATCH] fix nginx auth-proxy configuration to forward request bodies Move proxy_pass directive to correct position in nginx location block and update proxy settings: enable request body forwarding (proxy_pass_request_body on) and pass original Content-Length header (from $content_length variable) instead of stripping it, ensuring auth-proxy receives full request payloads. --- docs/deploy.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/deploy.md b/docs/deploy.md index e59c7e0..f5f056c 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -37,17 +37,19 @@ docker-compose up -d # spoofed. If you need a CDN, configure the realip module instead # of trusting the header. +location = /_auth_proxy { location = /_auth_proxy { internal; - proxy_pass http://auth-proxy:8080/auth; - - proxy_pass_request_body off; - proxy_set_header Content-Length ""; + proxy_pass_request_body on; + proxy_set_header Content-Length $content_length; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Original-Host $host; proxy_set_header X-Original-URI $request_uri; proxy_set_header Authorization $http_authorization; + + proxy_pass http://auth-proxy:8080/auth; +} } ```