File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 4848 "http-aws-es" : " ^1.1.3" ,
4949 "joi" : " ^8.0.5" ,
5050 "lodash" : " ^4.16.4" ,
51+ "method-override" : " ^2.3.9" ,
5152 "pg" : " ^4.5.5" ,
5253 "pg-native" : " ^1.10.0" ,
5354 "sequelize" : " ^3.23.0" ,
Original file line number Diff line number Diff line change 11import express from 'express' ;
2+ import methodOverride from 'method-override' ;
23import _ from 'lodash' ;
34import bodyParser from 'body-parser' ;
45import config from 'config' ;
@@ -11,6 +12,11 @@ import analytics from './events/analytics';
1112
1213const app = express ( ) ;
1314
15+ // allows overriding HTTP Method
16+ // both arguments to the methodOverride are optional because they are the default
17+ // values, but we are specifying them to avoid any future change in defaults
18+ app . use ( methodOverride ( 'X-HTTP-Method-Override' , { methods : [ 'POST' ] } ) ) ;
19+
1420// =======================
1521// configuration =========
1622// =======================
You can’t perform that action at this time.
0 commit comments