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:
parent
943e1c872c
commit
561c4b208d
1 changed files with 0 additions and 7 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue