]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix opslog can not record remote_addr
authorJiaying Ren <jiaying.ren@umcloud.com>
Mon, 7 Aug 2017 07:55:19 +0000 (15:55 +0800)
committerAdam C. Emerson <aemerson@redhat.com>
Sun, 7 Jan 2018 10:10:21 +0000 (05:10 -0500)
Fixes: http://tracker.ceph.com/issues/20931
Reported-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
Signed-off-by: Jiaying Ren <jiaying.ren@umcloud.com>
(cherry picked from commit 650d30d64e084df12f4cfcb3d1edaefb5d475bb4)

src/rgw/rgw_civetweb.cc

index 93a8a030ac007d660ad664118437688d7c8c0995..110a891ca9229925064e587a9cd9aaf2c67a000e 100644 (file)
@@ -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 */