From d2e14abfd56b041d6a5539dda40db717cdb3623b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Tue, 27 Jun 2017 12:57:47 +0200 Subject: [PATCH] Inverted the order of prefixes in Request.token property. As suggested by @allan-simon See: https://github.com/channelcat/sanic/pull/811#pullrequestreview-46144327 --- sanic/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanic/request.py b/sanic/request.py index 29cb83f6..f1b3b441 100644 --- a/sanic/request.py +++ b/sanic/request.py @@ -86,7 +86,7 @@ class Request(dict): :return: token related to request """ - prefixes = ('Token ', 'Bearer ') + prefixes = ('Bearer', 'Token ') auth_header = self.headers.get('Authorization') if auth_header is not None: