The X-Forwarded-For header should append client IP addresses rather than overwriting them, ensuring the entire chain of forwarding is maintained.
For other X-Forwarded-* headers, ensure that they are either passed through or explicitly set as required so that they reflect the URL the user sees. Verify how your proxy handles header inheritance (e.g., whether existing headers are preserved).