docker-ddns icon indicating copy to clipboard operation
docker-ddns copied to clipboard

Read IP through Traefik

Open JAP42 opened this issue 6 years ago • 1 comments

Wondering what headers would need to be passed for this to work through a traefik proxy. Right now unless I specify an IP it gets set to the internal traefik network IP. I tried a few things but nothing is working. I think something might need to be changed on the software side also.

JAP42 avatar Jul 13 '19 23:07 JAP42

Hey, thanks for the request. The correct way of handling this would be using the X-Forwarded-For header where traefik would provide the requests origin IP address. However this is currently not handled since I only use r.RemoteAddr (https://github.com/dprandzioch/docker-ddns/blob/c9956b795ba7689e9dfd8ac260831ffe4873054e/rest-api/request_handler.go#L56 ).

When I have some spare time I can change this but unfortunately it will take some time until I get to it.

If someone wants to provide a pull request it will be much faster ;)

dstapp avatar Jul 18 '19 15:07 dstapp