feat: allow ACP API access to bearer tokens

closes nodebb/nodebb-plugin-write-api#132
v1.18.x
Julian Lam 4 years ago
parent 98a05e4dde
commit 3b1c03ed50

@ -99,7 +99,7 @@ module.exports = async function (app, middleware) {
var ensureLoggedIn = require('connect-ensure-login');
router.all('(/+api|/+api/*?)', middleware.prepareAPI);
router.all('(/+api/admin|/+api/admin/*?)', middleware.admin.checkPrivileges);
router.all('(/+api/admin|/+api/admin/*?)', middleware.authenticate, middleware.admin.checkPrivileges);
router.all('(/+admin|/+admin/*?)', ensureLoggedIn.ensureLoggedIn(nconf.get('relative_path') + '/login?local=1'), middleware.applyCSRF, middleware.admin.checkPrivileges);
app.use(middleware.stripLeadingSlashes);

Loading…
Cancel
Save