Skip to content

Commit 35dcbe5

Browse files
committed
Remove redundant config check in locations loop
1 parent 6a8a634 commit 35dcbe5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

flask_jwt_extended/view_decorators.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,14 @@ def _decode_jwt_from_request(request_type):
252252

253253
# add the functions in the order specified in JWT_TOKEN_LOCATION
254254
for location in locations:
255-
if location == 'cookies' and config.jwt_in_cookies:
255+
if location == 'cookies':
256256
get_encoded_token_functions.append(
257257
lambda: _decode_jwt_from_cookies(request_type))
258-
if location == 'query_string' and config.jwt_in_query_string:
258+
if location == 'query_string':
259259
get_encoded_token_functions.append(_decode_jwt_from_query_string)
260-
if location == 'headers' and config.jwt_in_headers:
260+
if location == 'headers':
261261
get_encoded_token_functions.append(_decode_jwt_from_headers)
262-
if location == 'json' and config.jwt_in_json:
262+
if location == 'json':
263263
get_encoded_token_functions.append(
264264
lambda: _decode_jwt_from_json(request_type))
265265

0 commit comments

Comments
 (0)