From 4b61a9c73cd6706648858fdde8139218f89638b9 Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 7 Mar 2021 18:35:37 -0600 Subject: [PATCH] /robots.txt: enable HTTP caching. Cache /robots.txt at the HTTP level because it rarely changes but it gets requested by bots relatively frequently. --- app/controllers/robots_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/robots_controller.rb b/app/controllers/robots_controller.rb index fda10c506..1c13acaeb 100644 --- a/app/controllers/robots_controller.rb +++ b/app/controllers/robots_controller.rb @@ -2,5 +2,6 @@ class RobotsController < ApplicationController respond_to :text def index + expires_in 1.hour, public: true unless response.cache_control.present? end end