Subdomain checks fixed

This commit is contained in:
Nejc Bernot 2016-12-01 14:20:43 +01:00
parent c54bd6df82
commit ef60982913

View file

@ -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