Use urlparse_cached() for OriginPolicy

This commit is contained in:
Paul Tremberth 2016-10-05 18:33:31 +02:00
parent 3af88a2877
commit f2ee6be3bb
1 changed files with 3 additions and 1 deletions

View File

@ -193,7 +193,9 @@ class OriginPolicy(ReferrerPolicy):
name = POLICY_ORIGIN
def referrer(self, response, request):
return self.strip_url(response.url, origin_only=True)
stripped = self.strip_url_parsed(response, origin_only=True)
if stripped is not None:
return urlunparse(stripped)
class OriginWhenCrossOriginPolicy(ReferrerPolicy):