Fix same hostname referrer

pull/2/head
Noah 2014-12-02 16:01:11 -08:00
부모 30b081cb86
커밋 d5291aeebd
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@ -80,8 +80,9 @@ def log_referrer(request, link):
"""Double check the referring URL."""
# Ignore if same domain.
if link.startswith(request.url_root):
print "Referrer is same host!"
hostname = server_name()
if link.startswith("http://{}".format(hostname)) or \
link.startswith("https://{}".format(hostname)):
return None
# See if the URL really links back to us.