scinote-web/app/utilities/user_subdomain.rb

11 lines
225 B
Ruby
Raw Normal View History

2019-09-12 23:21:48 +08:00
class UserSubdomain
def self.matches?(request)
if ENV['USER_SUBDOMAIN']
return (request.subdomain.present? &&
request.subdomain == ENV['USER_SUBDOMAIN'])
else
return true
end
end
end