app/controllers/concerns/api/v1/base.rb in bullet_train-api-1.0.12 vs app/controllers/concerns/api/v1/base.rb in bullet_train-api-1.0.13

- old
+ new

@@ -2,19 +2,26 @@ extend ActiveSupport::Concern included do include Api::V1::Defaults include Api::V1::LoadsAndAuthorizesApiResource + include Api::V1::ExceptionsHandler version "v1" - use ::WineBouncer::OAuth2 + use ::WineBouncer::OAuth2, message: "Doorkeeper OAuth2 Authentication" + rescue_from :all do |error| handle_api_error(error) end BulletTrain::Api.endpoints.each do |endpoint_class| mount endpoint_class.constantize + end + + after_validation do + # Ensure responses never get cached. + header "Cache-Control", "no-store" end end class_methods do # TODO I actually don't know of any way to make this work. This was supposed to be run after all other endpoints