Hi Idez
I create this middleware:
middlewares:
cf-real-ip:
plugin:
duplicateheader:
source: Cf-Connecting-Ip
destination:
- X-Real-Ip
- X-Forwarded-For
I add the middleware to the websecure entrypoint:
- --entrypoints.websecure.http.middlewares=cf-real-ip@file
The Plugin works, it can copy the Header Cf-Connecting-Ip
to the Headers X-Real-Ip
and X-Forwarded-For
. I checked this in some access-logs.
The error happens randomly and not so oftem.
fyi:
We try to update the headers with req.Header.Set
, the error came anyway. The we try to update the headers with req.Header.Del
and req.Header.Add
, but the error also appears.