Better PMS behaviour behind proxy

I have my PMS behind an HTTP proxy. As the proxy and the PMS are in the same local network (192.168.1.0/24), PMS does not require authentication at all. If I access the 32400 port directly, PMS asks for auth.

 

My request is, besides check if the HTTP request contains an X-Forwarded-For header and honour that if it exists, independing of what the socket remote IP is.