/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:
@@ -2,5 +2,6 @@ class RobotsController < ApplicationController
|
|||||||
respond_to :text
|
respond_to :text
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
expires_in 1.hour, public: true unless response.cache_control.present?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user