From 650d30d64e084df12f4cfcb3d1edaefb5d475bb4 Mon Sep 17 00:00:00 2001 From: Jiaying Ren Date: Mon, 7 Aug 2017 15:55:19 +0800 Subject: [PATCH] rgw: fix opslog can not record remote_addr Fixes: http://tracker.ceph.com/issues/20931 Reported-by: Zhang Shaowen Signed-off-by: Jiaying Ren --- src/rgw/rgw_civetweb.cc | 1 + 1 file changed, 1 insertion(+) 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 */ -- 2.47.3