|
@ -24,8 +24,11 @@ class TagManager |
|
|
|
|
|
|
|
|
def local_url?(url) |
|
|
def local_url?(url) |
|
|
uri = Addressable::URI.parse(url).normalize |
|
|
uri = Addressable::URI.parse(url).normalize |
|
|
|
|
|
return false unless uri.host |
|
|
domain = uri.host + (uri.port ? ":#{uri.port}" : '') |
|
|
domain = uri.host + (uri.port ? ":#{uri.port}" : '') |
|
|
|
|
|
|
|
|
TagManager.instance.web_domain?(domain) |
|
|
TagManager.instance.web_domain?(domain) |
|
|
|
|
|
rescue Addressable::URI::InvalidURIError |
|
|
|
|
|
false |
|
|
end |
|
|
end |
|
|
end |
|
|
end |