/robots.txt: enable HTTP caching.

Cache /robots.txt at the HTTP level because it rarely changes but it
gets requested by bots relatively frequently.
This commit is contained in:
evazion
2021-03-07 18:35:37 -06:00
parent 250e7657b5
commit 4b61a9c73c

View File

@@ -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