File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 48
48
"http-aws-es" : " ^1.1.3" ,
49
49
"joi" : " ^8.0.5" ,
50
50
"lodash" : " ^4.16.4" ,
51
+ "method-override" : " ^2.3.9" ,
51
52
"pg" : " ^4.5.5" ,
52
53
"pg-native" : " ^1.10.0" ,
53
54
"sequelize" : " ^3.23.0" ,
Original file line number Diff line number Diff line change 1
1
import express from 'express' ;
2
+ import methodOverride from 'method-override' ;
2
3
import _ from 'lodash' ;
3
4
import bodyParser from 'body-parser' ;
4
5
import config from 'config' ;
@@ -11,6 +12,11 @@ import analytics from './events/analytics';
11
12
12
13
const app = express ( ) ;
13
14
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
+
14
20
// =======================
15
21
// configuration =========
16
22
// =======================
You can’t perform that action at this time.
0 commit comments