I've upgraded to Rails 4.1.0 today. Cross-site request forgery (CSRF) protection now covers GET requests with JavaScript responses, too.
I have a few remote GET links in the app that are hit by the bots and are now throwing ActionController::InvalidCrossOriginRequest exception.
So I added another rescue_from line to application_controller:
rescue_from ActionController::InvalidCrossOriginRequest, with: :render_400
Here's the render_400 method:
def render_400
render(nothing: true, status: 400) and return
end
I'm still getting AbstractController::DoubleRenderError even though I added and return
as you can see above.
It happens only with the ActionController::InvalidCrossOriginRequest exception. Others like e.g. ActionController::BadRequest and not resulting in AbstractController::DoubleRenderError.