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:
parent
e74b38ac93
commit
29a403cc68
1 changed files with 4 additions and 0 deletions
|
@ -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'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue