diff --git a/app.js b/app.js index 5c3466c53..b25076162 100755 --- a/app.js +++ b/app.js @@ -1,6 +1,7 @@ 'use strict'; var express = require('express'); +var methodOverride = require('method-override'); var minify = require('express-minify'); var MongoStore = require('connect-mongo')(express); var mongoose = require('mongoose'); @@ -50,7 +51,7 @@ if (process.env.NODE_ENV !== 'production') { app.use(express.urlencoded()); app.use(express.json()); app.use(express.compress()); -app.use(express.methodOverride()); +app.use(methodOverride('X-HTTP-Method-Override')); // Order is very important here (i.e mess with at your own risk) app.use(express.cookieParser()); diff --git a/package.json b/package.json index d9fdf14d0..535a598f7 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "highlight.js": "8.3.0", "jquery": "2.1.1", "marked": "0.3.2", + "method-override": "2.3.0", "moment": "2.8.3", "mongoose": "3.8.19", "mu2": "0.5.20",