Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ class ApplicationController < ActionController::Base
redirect_to root_path
end

# Bots/crawlers requesting non-HTML formats (e.g. text/plain) trigger
# MissingTemplate errors because we only have .html.erb templates.
# Return 406 Not Acceptable instead of a 500 error.
rescue_from ActionView::MissingTemplate do
head :not_acceptable
end

private

def after_sign_out_path_for(resource_or_scope)
Expand Down
13 changes: 12 additions & 1 deletion public/robots.txt
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
User-agent: *
Allow: /workshops
Allow: /resources
Allow: /stories
Allow: /community_news
Allow: /events
Allow: /tutorials
Allow: /faqs
Allow: /contact_us
Allow: /tags
Allow: /story_shares
Disallow: /