There was an error while loading. Please reload this page.
1 parent 8d360d7 commit 9e55a55Copy full SHA for 9e55a55
index.js
@@ -298,16 +298,17 @@ class Web {
298
// flash messages
299
app.use(flash());
300
301
- // method override
302
- // (e.g. `<input type="hidden" name="_method" value="PUT" />`)
303
- app.use(methodOverride());
304
-
305
// body parser
306
app.use(bodyParser());
307
308
// pretty-printed json responses
309
app.use(json());
310
+ // method override
+ // (e.g. `<input type="hidden" name="_method" value="PUT" />`)
+ if (this.config.methodOverride)
+ app.use(methodOverride(...this.config.methodOverride));
311
+
312
// ajax request detection (sets `ctx.state.xhr` boolean)
313
app.use(isajax());
314
0 commit comments