Revert "Add support for ads.txt redirect"
This reverts commit f6c7c2d1af.
Ads.txt redirection can be done directly in core, in admin/customize/permalinks.
This commit is contained in:
@@ -176,20 +176,3 @@ and (max-width : 775px) {
|
||||
}
|
||||
|
||||
CSS
|
||||
|
||||
after_initialize do
|
||||
require_dependency 'application_controller'
|
||||
class ::AdstxtController < ::ApplicationController
|
||||
skip_before_action :check_xhr
|
||||
|
||||
def index
|
||||
raise Discourse::NotFound unless SiteSetting.adsense_ads_txt_url.present?
|
||||
|
||||
redirect_to SiteSetting.adsense_ads_txt_url
|
||||
end
|
||||
end
|
||||
|
||||
Discourse::Application.routes.append do
|
||||
get '/ads.txt' => "adstxt#index"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user