diff --git a/ghost/core/core/server/web/comments/routes.js b/ghost/core/core/server/web/comments/routes.js index c0b8eacabd..59f6b160b4 100644 --- a/ghost/core/core/server/web/comments/routes.js +++ b/ghost/core/core/server/web/comments/routes.js @@ -11,15 +11,15 @@ module.exports = function apiRoutes() { const router = express.Router('comment api'); router.use(bodyParser.json({limit: '50mb'})); - // Global handling for member session, ensures a member is logged in to the frontend - router.use(membersService.middleware.loadMemberSession); - const countsCache = shared.middleware.cacheControl( 'public', {maxAge: config.get('caching:commentsCountAPI:maxAge')} ); router.get('/counts', countsCache, http(api.commentsMembers.counts)); + // Authenticated Routes + router.use(membersService.middleware.loadMemberSession); + router.get('/', http(api.commentsMembers.browse)); router.get('/:id', http(api.commentsMembers.read)); router.post('/', http(api.commentsMembers.add));