Adding Conditional Check for ActionController::API

Also passing example back into Middleware, but setting it up in the after hook in rspec.