diff --git a/core/server/web/api/v2/content/routes.js b/core/server/web/api/v2/content/routes.js index 4641d0bcb7..85a1dad9c9 100644 --- a/core/server/web/api/v2/content/routes.js +++ b/core/server/web/api/v2/content/routes.js @@ -1,10 +1,13 @@ const express = require('express'); +const cors = require('cors'); const apiv2 = require('../../../../api/v2'); const mw = require('./middleware'); module.exports = function apiRoutes() { const router = express.Router(); + router.options('*', cors()); + // ## Posts router.get('/posts', mw.authenticatePublic, apiv2.http(apiv2.posts.browse)); router.get('/posts/:id', mw.authenticatePublic, apiv2.http(apiv2.posts.read));