From: Jiaying Ren Date: Mon, 7 Aug 2017 07:55:19 +0000 (+0800) Subject: rgw: fix opslog can not record remote_addr X-Git-Tag: v13.0.1~1148^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=650d30d64e084df12f4cfcb3d1edaefb5d475bb4;p=ceph.git rgw: fix opslog can not record remote_addr Fixes: http://tracker.ceph.com/issues/20931 Reported-by: Zhang Shaowen Signed-off-by: Jiaying Ren --- diff --git a/src/rgw/rgw_civetweb.cc b/src/rgw/rgw_civetweb.cc index 93a8a030ac0..110a891ca92 100644 --- a/src/rgw/rgw_civetweb.cc +++ b/src/rgw/rgw_civetweb.cc @@ -110,6 +110,7 @@ void RGWCivetWeb::init_env(CephContext *cct) env.set(buf, value); } + env.set("REMOTE_ADDR", info->remote_addr); env.set("REQUEST_METHOD", info->request_method); env.set("REQUEST_URI", info->request_uri); // get the full uri, we anyway handle abs uris later env.set("SCRIPT_URI", info->uri); /* FIXME */