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 2323 "babel-register" : " ^6.14.0" ,
2424 "body-parser" : " ^1.15.2" ,
2525 "bunyan" : " ^1.8.1" ,
26+ "cors" : " ^2.8.4" ,
2627 "express" : " ^4.14.0" ,
2728 "fs-extra" : " ^5.0.0" ,
2829 "joi" : " ^13.1.2" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import ProcessController from './controllers/process';
99import RulesController from './controllers/rules' ;
1010import TemplatesController from './controllers/templates' ;
1111import TestController from './controllers/test' ;
12+ import cors from 'cors' ;
1213
1314let logger = new Logger ( 'Server' ) ;
1415
@@ -58,6 +59,7 @@ export default class ElastalertServer {
5859 // Start the server when the config is loaded
5960 config . ready ( function ( ) {
6061 try {
62+ self . _express . use ( cors ( ) ) ;
6163 self . _express . use ( bodyParser . json ( ) ) ;
6264 self . _express . use ( bodyParser . urlencoded ( { extended : true } ) ) ;
6365 self . _setupRouter ( ) ;
You can’t perform that action at this time.
0 commit comments