2023-12-29 15:10:59 |
Galen Charlton |
description |
Currently osrf-websocket-stdio grabs the client IP from REMOTE_ADDR as set by websocketd. Since most/all Evergreen setups have a proxy sitting in front of websocketd (or should), REMOTE_ADDR is most often set to "127.0.0.1", although setups are possible where the proxy and the websocketd server are not the same host.
This isn't particularly useful; instead, it would be more convenient to log the real client IP address. Since both the NGINZX and HAProxy configurations shipped with OpenSRF set X-Forwarded-For, we can use instead (as websocketd maps it to an environment variable HTTP_X_FORWARDED_FOR. |
Currently osrf-websocket-stdio grabs the client IP from REMOTE_ADDR as set by websocketd. Since most/all Evergreen setups have a proxy sitting in front of websocketd (or should), REMOTE_ADDR is most often set to "127.0.0.1", although setups are possible where the proxy and the websocketd server are not the same host.
This isn't particularly useful; instead, it would be more convenient to log the real client IP address. Since both the NGINX and HAProxy configurations shipped with OpenSRF set X-Forwarded-For, we can use instead (as websocketd maps it to an environment variable HTTP_X_FORWARDED_FOR. |
|