Skip to content

Commit d423e00

Browse files
AymericDufvennetier
authored andcommitted
s3api: fix the allow_anymous_path_requests
When false, it was also denying anonymous virtual-host mode requests. Thanks to @fvennetier
1 parent 7ac1b75 commit d423e00

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

swift3/request.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,6 @@ def _is_allowed_anonymous_request(self):
622622
623623
Will return False if anonymous requests are disabled by configuration.
624624
"""
625-
if not CONF.allow_anymous_path_request:
626-
return False
627-
628625
if not self._is_anonymous:
629626
return False
630627

@@ -640,7 +637,7 @@ def _is_allowed_anonymous_request(self):
640637
# Not an S3 request
641638
return False
642639
# Path-style anonymous request
643-
return True
640+
return CONF.allow_anymous_path_request
644641

645642
def _parse_auth_info(self):
646643
"""Extract the access key identifier and signature.

0 commit comments

Comments
 (0)