0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Supported a god_mode param in the Admin API

This currently skips the not-implemented middleware and can be used to
access experimental endpoints whilst in development.
This commit is contained in:
Fabien "egg" O'Carroll 2023-06-09 08:51:26 +02:00 committed by Fabien 'egg' O'Carroll
parent e74b38ac93
commit 29a403cc68

View file

@ -14,6 +14,10 @@ const notImplemented = function (req, res, next) {
return next(); return next();
} }
if (req.query.god_mode === 'true' && process.env.NODE_ENV === 'development') {
return next();
}
// @NOTE: integrations & staff tokens have limited access to the API // @NOTE: integrations & staff tokens have limited access to the API
const allowlisted = { const allowlisted = {
site: ['GET'], site: ['GET'],