UNPKG
allow-options
Version:
latest (0.0.3)
0.0.3
0.0.1
npm that acknowledges OPTIONS method
allow-options
/
index.js
14 lines
(11 loc)
•
210 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/** * Created by sridharrajs. */
'use strict'
;
function
allowOptions
(
req, res, next
) {
if
(req.
method
===
'OPTIONS'
) {
return
res.
status
(
200
); }
next
(); }
module
.
exports
= allowOptions;