mirror of
https://github.com/caddyserver/caddy.git
synced 2026-09-06 11:18:37 +00:00
* 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> |
||
|---|---|---|
| .. | ||
| caddyauth | ||
| encode | ||
| fileserver | ||
| headers | ||
| map | ||
| proxyprotocol | ||
| push | ||
| requestbody | ||
| reverseproxy | ||
| rewrite | ||
| standard | ||
| templates | ||
| tracing | ||
| app.go | ||
| autohttps.go | ||
| caddyhttp.go | ||
| caddyhttp_test.go | ||
| celmatcher.go | ||
| celmatcher_test.go | ||
| duplex_go120.go | ||
| duplex_go121.go | ||
| errors.go | ||
| http2listener.go | ||
| httpredirectlistener.go | ||
| invoke.go | ||
| ip_matchers.go | ||
| ip_range.go | ||
| logging.go | ||
| marshalers.go | ||
| matchers.go | ||
| matchers_test.go | ||
| metrics.go | ||
| metrics_test.go | ||
| replacer.go | ||
| replacer_test.go | ||
| responsematchers.go | ||
| responsematchers_test.go | ||
| responsewriter.go | ||
| responsewriter_test.go | ||
| routes.go | ||
| server.go | ||
| server_test.go | ||
| staticerror.go | ||
| staticresp.go | ||
| staticresp_test.go | ||
| subroute.go | ||
| vars.go | ||