Merge pull request #1193 from terrycain/header_parse_fix
Fix parsing non V4 Authorization headers
This commit is contained in:
commit
b17136e36c
@ -167,7 +167,7 @@ class BaseResponse(_TemplateEnvironmentMixin):
|
|||||||
match = re.search(self.region_regex, full_url)
|
match = re.search(self.region_regex, full_url)
|
||||||
if match:
|
if match:
|
||||||
region = match.group(1)
|
region = match.group(1)
|
||||||
elif 'Authorization' in request.headers:
|
elif 'Authorization' in request.headers and 'AWS4' in request.headers['Authorization']:
|
||||||
region = request.headers['Authorization'].split(",")[
|
region = request.headers['Authorization'].split(",")[
|
||||||
0].split("/")[2]
|
0].split("/")[2]
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user