Is it possible to disable automatic etag header generation in rails for a specific action?
I tried to set response.etag = nil in the action, in an after_filter and in a before_filter. None of them have worked.
Is it possible to disable automatic etag header generation in rails for a specific action?
I tried to set response.etag = nil in the action, in an after_filter and in a before_filter. None of them have worked.
E-tags are generated by Rack middleware. You should be able to skip e-tag generation by setting a cache control header in the response.
This can be done by calling expires_now
in your controller action to skip caching in Rack and any other servers that handle your request.
Here is a reference from Heroku that is applicable to Rails apps in general.