Revert "Deprecate API v2" (#7801)

This commit is contained in:
Matteo Pagliazzi
2016-07-17 18:15:25 +02:00
committed by GitHub
parent 45c31a2bcf
commit 590adb3438
193 changed files with 11487 additions and 230 deletions

View File

@@ -1,9 +0,0 @@
module.exports = function corsMiddleware (req, res, next) {
res.set({
'Access-Control-Allow-Origin': req.header('origin') || '*',
'Access-Control-Allow-Methods': 'OPTIONS,GET,POST,PUT,HEAD,DELETE',
'Access-Control-Allow-Headers': 'Content-Type,Accept,Content-Encoding,X-Requested-With,x-api-user,x-api-key',
});
if (req.method === 'OPTIONS') return res.sendStatus(200);
return next();
};