File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change 23
23
"babel-register" : " ^6.14.0" ,
24
24
"body-parser" : " ^1.15.2" ,
25
25
"bunyan" : " ^1.8.1" ,
26
+ "cors" : " ^2.8.4" ,
26
27
"express" : " ^4.14.0" ,
27
28
"fs-extra" : " ^5.0.0" ,
28
29
"joi" : " ^13.1.2" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import ProcessController from './controllers/process';
9
9
import RulesController from './controllers/rules' ;
10
10
import TemplatesController from './controllers/templates' ;
11
11
import TestController from './controllers/test' ;
12
+ import cors from 'cors' ;
12
13
13
14
let logger = new Logger ( 'Server' ) ;
14
15
@@ -58,6 +59,7 @@ export default class ElastalertServer {
58
59
// Start the server when the config is loaded
59
60
config . ready ( function ( ) {
60
61
try {
62
+ self . _express . use ( cors ( ) ) ;
61
63
self . _express . use ( bodyParser . json ( ) ) ;
62
64
self . _express . use ( bodyParser . urlencoded ( { extended : true } ) ) ;
63
65
self . _setupRouter ( ) ;
You can’t perform that action at this time.
0 commit comments