FIX: AI share page assets via CDN on login-required sites (#1343)

AI share page assets are loaded via the app CDN, which means the requests have no authentication and will never appear to the app as "logged in". Therefore we should skip the `redirect_to_login_if_required` before_action.
This commit is contained in:
David Taylor 2025-05-16 09:30:38 +01:00 committed by GitHub
parent 7316058dfc
commit 77d3a38e49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ module DiscourseAi
before_action :require_site_settings!
skip_before_action :preload_json, :check_xhr, only: %i[show asset]
skip_before_action :verify_authenticity_token, only: ["asset"]
skip_before_action :redirect_to_login_if_required, :verify_authenticity_token, only: %i[asset]
def create
ensure_allowed_create!