discourse-adplugin/app/controllers/adstxt_controller.rb

14 lines
322 B
Ruby
Raw Permalink Normal View History

2024-03-05 16:39:27 +01:00
# frozen_string_literal: true
#
class AdstxtController < ::ApplicationController
requires_plugin AdPlugin.plugin_name
skip_before_action :preload_json, :check_xhr, :redirect_to_login_if_required
def index
raise Discourse::NotFound if SiteSetting.ads_txt.blank?
2024-03-05 16:39:27 +01:00
render plain: SiteSetting.ads_txt
end
end