This commit is contained in:
3xp10it 2017-08-23 14:15:02 +08:00
parent 20daabdfc8
commit 76cc25d470

View File

@ -331,7 +331,12 @@ def _feedTargetsDict(reqFile, addedTargetUrls):
elif not scheme and port == "443": elif not scheme and port == "443":
scheme = "https" scheme = "https"
if conf.forceSSL: hostPattern=host.replace(".","\.")
if (conf.forceSSL or re.search(r"host:[^\n\r]*%s:%s[\s\S]*referer:[^\n\r]*https://%s:%s.*" %
(hostPattern, port, hostPattern, port), request, re.I)
or (port != 80
and re.search(r"host:[^\n\r]*%s:%s[\s\S]*referer:[^\n\r]*https://.*cdn.*" %
(hostPattern, port), request, re.I))):
scheme = "https" scheme = "https"
port = port or "443" port = port or "443"