127.0.0.1 compatibility changes

This commit is contained in:
Kaan Soral
2023-10-16 12:28:47 +03:00
parent aa94699f23
commit 5157de4f8c
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -282,6 +282,7 @@ def security_threat(self,domain):
referer=referer.replace("http://","").replace("https://","")
#referer="www.thegame2.com"
logging.info(referer)
if referer.startswith("127.0.0.1"): return False
if not (referer.startswith("%s.%s.%s/"%(domain.domain[0],domain.domain[1],domain.domain[2])) or referer.startswith("%s.%s/"%(domain.domain[1],domain.domain[2])) or referer=="%s.%s.%s"%(domain.domain[0],domain.domain[1],domain.domain[2]) or referer=="%s.%s"%(domain.domain[1],domain.domain[2])):
self.response.out.write("Threat detected")
return True