0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server
Hannah Wolfe 0eedb1c556
Added 307 redirects for old API endpoints
closes: https://github.com/TryGhost/Toolbox/issues/296

- This is a small change to permit any known API version to redirect to an unversioned URL
- We include v2 because although it should have been deleted in 5.0 anyway, in the spirit of the change away from versioned URLs there's
  absolutely no sense in forcing people to update clients that still work for no reason.
- We use a 307, because this preserves the original HTTP method, allowing POSTS, PUTs and DELETEs through as well as GETs
- We set the accept-version header on the redirect, meaning that for example with a request to the old /v4/ api, Ghost will respond as though
  the client sent `accept-version: v4.0` and if there are known breaking changes, it may choose to inform the admin and owner users of these
2022-04-28 15:37:14 +01:00
..
adapters 🔥 Removed versioned APIs 2022-04-28 15:37:09 +01:00
api Changed /email_previews/posts/<post id> endpoint to return 204 upon success 2022-04-28 15:37:13 +01:00
data Added erroring migrations to the final minor of deleted majors 2022-04-28 15:37:10 +01:00
lib Updated probe-image-size options to reflect underlying change 2022-03-09 20:27:38 +00:00
models Renamed destroyByAuthor to reassignByAuthor 2022-04-28 15:37:13 +01:00
services Renamed destroyByAuthor to reassignByAuthor 2022-04-28 15:37:13 +01:00
views Updated unsubscribe page 2022-03-10 10:39:20 +00:00
web Added 307 redirects for old API endpoints 2022-04-28 15:37:14 +01:00
analytics-events.js
ghost-server.js Removed config and bluebird from ghost-server 2022-04-28 15:37:10 +01:00
notify.js
overrides.js
run-update-check.js
update-check.js 🔥 Removed versioned APIs 2022-04-28 15:37:09 +01:00