Вопрос

I am using AWS ELB on two ColdFusion servers. I am able to get the client's local ip using #cgi.http_x_forwarded_for# but I can't turn on debugging b/c the only IP it recognizes is the IP of the ELB. Enabling debugging in this manner exposes the robust exception info to the public, which is obviously not a good idea.

Is it possible to get CF admin to recognize the client IP address through some manner of IIS header re-writing or something similar? Or modify the ColdFusion debugger to use the http_x_forwarded_for?

Это было полезно?

Решение

Never mind, I figured it out. I added the following to c:\coldfusion10\cfusion\runtime\conf\server.xml:

<Valve className="org.apache.catalina.valves.RemoteIpValve" 
    protocolHeader="X-Forwarded-Proto" 
    remoteIpHeader="X-Forwarded-For" 
    protocolHeaderHttpsValue="https" />
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top