about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-06 16:36:16 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-06 16:36:16 +0200
commit15d01a5e08dd13b55d6b67ea26d56894487c09a9 (patch)
tree44e31821b823d4fa53e1a592f604249290339cb5 /app/lib
parentb304cc07d525fdf0843cac419fa0e8e4bdda714e (diff)
Better comparison of "local" domain
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/tag_manager.rb4
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?