Ruby on rails 在rails中设置过期标头
我的应用程序控制器中的before_过滤器中有以下内容:Ruby on rails 在rails中设置过期标头,ruby-on-rails,ruby-on-rails-3,Ruby On Rails,Ruby On Rails 3,我的应用程序控制器中的before_过滤器中有以下内容: def response_headers response.headers["Expires"] = CGI.rfc1123_date(Time.now + 1.year) end 但是根据YSlow的说法,仍然没有设置任何expire头。有什么想法吗?如果您使用curl-I检查会发生什么?这将显示返回的完整标题。我在结果中看到Expires:Sat,2012年9月8日21:14:09 GMT。那只是因为YSlow很奇怪吗?如果可以
def response_headers
response.headers["Expires"] = CGI.rfc1123_date(Time.now + 1.year)
end
但是根据YSlow的说法,仍然没有设置任何expire头。有什么想法吗?如果您使用
curl-I
检查会发生什么?这将显示返回的完整标题。我在结果中看到Expires:Sat,2012年9月8日21:14:09 GMT。那只是因为YSlow很奇怪吗?如果可以的话,也许可以粘贴完整的标题。可能存在某种缓存忽略指令。