File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 2020from .scopes import get_scopes_backend
2121from .settings import oauth2_settings
2222from .utils import jwk_from_pem
23- from .validators import RedirectURIValidator , WildcardSet , URIValidator
23+ from .validators import RedirectURIValidator , URIValidator , WildcardSet
24+
2425
2526logger = logging .getLogger (__name__ )
2627
@@ -135,6 +136,7 @@ class AbstractApplication(models.Model):
135136 blank = True ,
136137 help_text = _ ("Allowed origins list to enable CORS, space separated" ),
137138 )
139+
138140 class Meta :
139141 abstract = True
140142
@@ -807,7 +809,9 @@ def is_origin_allowed(origin, allowed_origins):
807809 parsed_origin = urlparse (origin )
808810 for allowed_origin in allowed_origins :
809811 parsed_allowed_origin = urlparse (allowed_origin )
810- if (parsed_allowed_origin .scheme == parsed_origin .scheme
811- and parsed_allowed_origin .netloc == parsed_origin .netloc ):
812+ if (
813+ parsed_allowed_origin .scheme == parsed_origin .scheme
814+ and parsed_allowed_origin .netloc == parsed_origin .netloc
815+ ):
812816 return True
813817 return False
You can’t perform that action at this time.
0 commit comments