mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Subdomain checks fixed
This commit is contained in:
parent
c54bd6df82
commit
ef60982913
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue