Skip to content

Commit 1e739f3

Browse files
authored
Merge pull request ceph#58339 from clwluvw/s3website-no-host
rgw: use s3website REST when higher priority and no host header Reviewed-by: Casey Bodley <[email protected]>
2 parents 9069e1a + 5913f58 commit 1e739f3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rgw/rgw_rest.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,6 +2164,11 @@ int RGWREST::preprocess(req_state *s, rgw::io::BasicClient* cio)
21642164
<< " s->info.domain=" << s->info.domain
21652165
<< " s->info.request_uri=" << s->info.request_uri
21662166
<< dendl;
2167+
} else if (s3website_enabled && api_priority_s3website > api_priority_s3) {
2168+
// If the Host header is missing, but the s3website API is enabled and has
2169+
// a higher priority than the regular S3 API, then we should still treat
2170+
// the request as a website request.
2171+
s->prot_flags |= RGW_REST_WEBSITE;
21672172
}
21682173

21692174
if (s->info.domain.empty()) {

0 commit comments

Comments
 (0)