diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-06-09 03:30:13 +0200 |
---|---|---|
committer | Yehuda Sadeh <yehuda@redhat.com> | 2015-10-13 01:23:07 +0200 |
commit | d07ce03a4a386e38bf6e56fdb595606890b74cd4 (patch) | |
tree | 131d67ecd2cc7634a04554fadb20d142485dc882 /src/rgw/rgw_main.cc | |
parent | rgw-website: cleanup unused variable: rules (diff) | |
download | ceph-d07ce03a4a386e38bf6e56fdb595606890b74cd4.tar.xz ceph-d07ce03a4a386e38bf6e56fdb595606890b74cd4.zip |
rgw-website: Do not apply retarget for an authenticated request.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'src/rgw/rgw_main.cc')
-rw-r--r-- | src/rgw/rgw_main.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 8b2382d9c78..ee6cc24c71d 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -601,7 +601,13 @@ static int process_request(RGWRados *store, RGWREST *rest, RGWRequest *req, RGWC goto done; } - if (op->supports_website()) { + /** + * Only some accesses support website mode, and website mode does NOT apply + * if you are using the REST endpoint either (ergo, no authenticated access) + */ + dout(20) << "retarget uid=" << s->user.user_id << dendl; + if (op->supports_website() && !rgw_user_is_authenticated(s->user)) { + //if (op->supports_website()) { req->log(s, "recalculating target"); ret = handler->retarget(op, &op); if (ret < 0) { |