mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
our referer is bust if there is no domain
This commit is contained in:
parent
64c89316a6
commit
f3ac84d41f
1 changed files with 2 additions and 1 deletions
|
@ -40,7 +40,8 @@ class IncomingLink < ActiveRecord::Base
|
|||
# Internal: Extract the domain from link.
|
||||
def extract_domain
|
||||
if referer.present?
|
||||
self.domain = URI.parse(referer).host
|
||||
self.domain = URI.parse(self.referer).host
|
||||
self.referer = nil unless self.domain
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue