Class: Stitches::ValidMimeType
- Inherits:
-
AllowlistMiddleware
- Object
- AllowlistMiddleware
- Stitches::ValidMimeType
- Defined in:
- lib/stitches/valid_mime_type.rb
Overview
A middleware that requires all API calls to be for versioned JSON. This means that the Accept header (available to Rack apps as HTTP_ACCEPT) should be like so:
application/json; version=1
This just checks that you’ve specified some numeric version. ApiVersionConstraint should be used to “lock down” the versions you accept.
Method Summary
Methods inherited from AllowlistMiddleware
Constructor Details
This class inherits a constructor from Stitches::AllowlistMiddleware