diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-10-06 16:36:16 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-10-06 16:36:16 +0200 |
commit | 15d01a5e08dd13b55d6b67ea26d56894487c09a9 (patch) | |
tree | 44e31821b823d4fa53e1a592f604249290339cb5 /app/lib | |
parent | b304cc07d525fdf0843cac419fa0e8e4bdda714e (diff) |
Better comparison of "local" domain
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/tag_manager.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb index 4d29ca1f8..ad76d10c4 100644 --- a/app/lib/tag_manager.rb +++ b/app/lib/tag_manager.rb @@ -17,6 +17,10 @@ class TagManager id.start_with?("tag:#{Rails.configuration.x.local_domain}") end + def local_domain?(domain) + domain.nil? || domain.gsub(/[\/]/, '') == Rails.configuration.x.local_domain + end + def uri_for(target) return target.uri if target.respond_to?(:local?) && !target.local? |