Ghost/core/test/unit/middleware
Hannah Wolfe 20f4166cc5 Version matching middleware
refs #6949

- Adds a new VersionMismatchError with status 400 (bad request)
- Adds middleware that checks the X-Ghost-Version header if it is provided
- If it is not provided, the middleware does nothing
- If it is provided, and the versions match, the middleware does nothing
- If it is provided, and the versions don't match, the middleware returns a VersionMismatchError
- Includes both unit and a functional test to prove the middleware works alone and as part of the whole system
2016-06-09 17:08:44 +01:00
..
api Version matching middleware 2016-06-09 17:08:44 +01:00
auth-strategies_spec.js Refactor content deletion 2016-03-22 10:10:09 -05:00
authentication_spec.js Add middleware for handling CORS 2016-03-31 10:58:52 -05:00
cache-control_spec.js Removed uneeded jshint comments in order to cleanup the tests 2016-02-17 12:52:43 +00:00
check-ssl_spec.js Removed uneeded jshint comments in order to cleanup the tests 2016-02-17 12:52:43 +00:00
cors_spec.js Add config URLS to CORS whitelist 2016-04-19 13:39:24 +01:00
decide-is-admin_spec.js Removed uneeded jshint comments in order to cleanup the tests 2016-02-17 12:52:43 +00:00
oauth_spec.js Refactor content deletion 2016-03-22 10:10:09 -05:00
redirect-to-setup_spec.js Removed uneeded jshint comments in order to cleanup the tests 2016-02-17 12:52:43 +00:00
serve-shared-file_spec.js fix: update_check_spec setup, serve-shared-file_spec setup 2016-04-14 18:24:53 +02:00
spam-prevention_spec.js move private-blogging functionality into an internal app 2016-04-11 08:58:41 -05:00
static-theme_spec.js Merge pull request #6517 from halfdan/fix-6516 2016-02-18 08:37:32 +00:00
theme-handler_spec.js Removed uneeded jshint comments in order to cleanup the tests 2016-02-17 12:52:43 +00:00
uncapitalise_spec.js Remove should-sinon dependency 2016-03-14 16:52:22 +00:00