0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/plugins/discourse-adplugin/app/controllers/adstxt_controller.rb

13 lines
322 B
Ruby
Vendored

# 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?
render plain: SiteSetting.ads_txt
end
end