|
|
@ -6,17 +6,12 @@ module WebAppControllerConcern
|
|
|
|
included do
|
|
|
|
included do
|
|
|
|
prepend_before_action :redirect_unauthenticated_to_permalinks!
|
|
|
|
prepend_before_action :redirect_unauthenticated_to_permalinks!
|
|
|
|
before_action :set_app_body_class
|
|
|
|
before_action :set_app_body_class
|
|
|
|
before_action :set_referrer_policy_header
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def set_app_body_class
|
|
|
|
def set_app_body_class
|
|
|
|
@body_classes = 'app-body'
|
|
|
|
@body_classes = 'app-body'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def set_referrer_policy_header
|
|
|
|
|
|
|
|
response.headers['Referrer-Policy'] = 'origin'
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def redirect_unauthenticated_to_permalinks!
|
|
|
|
def redirect_unauthenticated_to_permalinks!
|
|
|
|
return if user_signed_in? && current_account.moved_to_account_id.nil?
|
|
|
|
return if user_signed_in? && current_account.moved_to_account_id.nil?
|
|
|
|
|
|
|
|
|
|
|
|