瀏覽代碼

Fix same hostname referrer

pull/2/head
Noah Petherbridge 6 年之前
父節點
當前提交
d5291aeebd
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      rophako/model/tracking.py

+ 3
- 2
rophako/model/tracking.py 查看文件

@@ -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.


Loading…
取消
儲存