UNPKG

allow-options

Version:

npm that acknowledges OPTIONS method

14 lines (11 loc) 210 B
/** * Created by sridharrajs. */ 'use strict'; function allowOptions(req, res, next) { if (req.method === 'OPTIONS') { return res.status(200); } next(); } module.exports = allowOptions;