UNPKG
timofey-nodal
Version:
latest (0.16.4)
0.16.4
0.16.3
0.16.2
0.16.1
0.16.0
0.15.5
An API Server and Framework for node.js
github.com/keithwhor/nodal
keithwhor/nodal
timofey-nodal
/
src
/
middleware
/
cors_middleware.js
18 lines
(10 loc)
•
277 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict'
;
const
Nodal
=
require
(
'nodal'
);
class
CORSMiddleware
{
exec
(
controller, callback
) { controller.
allowOrigin
(
'*'
); controller.
appendHeader
(
'Access-Control-Allow-Headers'
,
'Authorization'
);
callback
(
null
); } }
module
.
exports
=
CORSMiddleware
;