fix: Locale not correct in root url when accessing help center with custom domain (#9110)
- Ensuring that SwitchLocale concern handles the case of custom domain for portals and set locale according to that Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
@@ -8,8 +8,7 @@ class PublicController < ActionController::Base
|
||||
|
||||
def ensure_custom_domain_request
|
||||
domain = request.host
|
||||
|
||||
return if [URI.parse(ENV.fetch('FRONTEND_URL', '')).host, URI.parse(ENV.fetch('HELPCENTER_URL', '')).host].include?(domain)
|
||||
return if DomainHelper.chatwoot_domain?(domain)
|
||||
|
||||
@portal = ::Portal.find_by(custom_domain: domain)
|
||||
return if @portal.present?
|
||||
|
||||
Reference in New Issue
Block a user