mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
OAuth2: OPTIONS pre-flights - don't check auth
Avoid checking client authentication during pre-flight requests, since the browser won't be sending it.
This commit is contained in:
@@ -195,7 +195,8 @@ class OAuth2AccessController(MinimalController):
|
||||
set_extension(request.environ, "json")
|
||||
MinimalController.pre(self)
|
||||
require_https()
|
||||
c.oauth2_client = self._get_client_auth()
|
||||
if request.method != "OPTIONS":
|
||||
c.oauth2_client = self._get_client_auth()
|
||||
|
||||
def _get_client_auth(self):
|
||||
auth = request.headers.get("Authorization")
|
||||
|
||||
Reference in New Issue
Block a user