Skip to content

Commit 0131191

Browse files
author
Vikas Agarwal
committed
Explicitly specified that only original POST can be converted into different request method
1 parent 8d663d4 commit 0131191

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ import analytics from './events/analytics';
1313
const app = express();
1414

1515
// allows overriding HTTP Method
16-
app.use(methodOverride('X-HTTP-Method-Override'))
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'] }))
1719

1820
// =======================
1921
// configuration =========

0 commit comments

Comments
 (0)