mirror of https://github.com/scrapy/scrapy.git
Update StrictOriginPolicy
This commit is contained in:
parent
deb8567116
commit
ebcacd3f54
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue