handle light middleware stack (rails-api)