Update StrictOriginPolicy

This commit is contained in:
Paul Tremberth 2017-01-17 17:18:00 +01:00
parent deb8567116
commit ebcacd3f54
1 changed files with 2 additions and 3 deletions

View File

@ -159,9 +159,8 @@ class StrictOriginPolicy(ReferrerPolicy):
name = POLICY_STRICT_ORIGIN
def referrer(self, response, request):
if ((urlparse_cached(response).scheme == 'https' and
self.potentially_trustworthy(request))
or urlparse_cached(response).scheme == 'http'):
if ((self.tls_protected(response) and self.potentially_trustworthy(request))
or not self.tls_protected(response)):
return self.origin_referrer(response)