module Harpiya module Frontend class Engine < ::Rails::Engine config.middleware.use 'Harpiya::Frontend::Middleware::SeoAssist' # Prevent XSS but allow text formatting config.action_view.sanitized_allowed_tags = %w(a b del em i ins mark p small strong sub sup) config.action_view.sanitized_allowed_attributes = %w(href) # sets the manifests / assets to be precompiled, even when initialize_on_precompile is false initializer 'harpiya.assets.precompile', group: :all do |app| app.config.assets.precompile += %w[ harpiya/frontend/all* ] end initializer 'harpiya.frontend.environment', before: :load_config_initializers do |_app| Harpiya::Frontend::Config = Harpiya::FrontendConfiguration.new end end end end