diff --git a/app/utilities/subdomain.rb b/app/utilities/subdomain.rb index d44662acb..0e4fd1fec 100644 --- a/app/utilities/subdomain.rb +++ b/app/utilities/subdomain.rb @@ -1,7 +1,7 @@ class UserSubdomain def self.matches?(request) if ENV['USER_SUBDOMAIN'] - return request.subdomain.present? && request.subdomain = ENV['USER_SUBDOMAIN'] + return (request.subdomain.present? && request.subdomain == ENV['USER_SUBDOMAIN']) else return true end @@ -12,8 +12,8 @@ class WopiSubdomain def self.matches?(request) if ENV['WOPI_ENABLED'] == "true" if ENV['WOPI_SUBDOMAIN'] - return request.subdomain.present? && request.subdomain = ENV['WOPI_SUBDOMAIN'] - else + return (request.subdomain.present? && request.subdomain == ENV['WOPI_SUBDOMAIN']) + else return true end else