0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-04 02:01:58 -05:00

Removed OPTIONS cors middleware from content api (#10013)

no-issue

The content API only supports GET requests so has no need for cors
middleware on OPTIONS. This also removes the router.del helper as it's
not used
This commit is contained in:
Fabien O'Carroll 2018-10-15 18:47:31 +07:00 committed by GitHub
parent 943e1c872c
commit 561c4b208d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,18 +1,11 @@
const express = require('express');
const api = require('../../../../api');
const apiv2 = require('../../../../api/v2');
const shared = require('../../../shared');
const mw = require('./middleware');
module.exports = function apiRoutes() {
const router = express.Router();
// alias delete with del
router.del = router.delete;
// ## CORS pre-flight check
router.options('*', shared.middlewares.api.cors);
// ## Configuration
router.get('/configuration', api.http(api.configuration.read));