summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/starlarkmw/tools/gen
diff options
context:
space:
mode:
authorThanmay Nath <110758050+ThanmayNath@users.noreply.github.com>2023-10-08 02:17:34 +0530
committerGitHub <noreply@github.com>2023-10-07 20:47:34 +0000
commit5653c36bc23d19a679f81023a760e4b20dc2c733 (patch)
treed6d9811159742ffc3a1deb5b650f5b36b7fde253 /modules/caddyhttp/starlarkmw/tools/gen
parent4feac4d83cd758c95194090d4f3468373ee342ef (diff)
templates: Add dummy `RemoteAddr` to `httpInclude` request, proxy compatibility (#5845)
* Enhancement: Allow X-Forwarded-For Header in httpInclude Virtual Requests The goal of this enhancement is to modify the funcHTTPInclude function in the Caddy codebase to include the X-Forwarded-For header in the virtual request. This change will enable reverse proxies to set the X-Forwarded-For header, ensuring that the client's IP address is correctly provided to the target endpoint. This modification is essential for applications that depend on the X-Forwarded-For header for various functionalities, such as authentication, logging, or content customization. * Updated tplcontext.go - set `virtReq.RemoteAddr = "127.0.0.1"` i have made the suggested changes * Apply suggestions from code review * Update modules/caddyhttp/templates/tplcontext.go --------- Co-authored-by: Francis Lavoie <lavofr@gmail.com>
Diffstat (limited to 'modules/caddyhttp/starlarkmw/tools/gen')
0 files changed, 0 insertions, 0 deletions