Create a filter for dealing with X-Forwarded-*.

Backport of b9f0c0b48c34b09cf9a0c6ce90014cd1aa570182 and 1102ddca33f819aa15d15f50760f484fc19d0fa7