See https://github.com/rails/rails/blob/93ae747c597f988b44d80dda16eb44eef1aecd50/actionpack/lib/action_controller/metal.rb#L33