Skip to content

Commit

Permalink
Remove a deprecation warning
Browse files Browse the repository at this point in the history
* Express 3 deprecated this a while back to a separate package. It is currently default used with POST request response so this probably needs to be kept in. Basically they are forcing this `Vary` header in on all form request responses...e.g. defining a newer type of standard. `'X-HTTP-Method-Override'` is placed in regardless of `methodOverride` parm being used or not. Pkg docs say to use it in intial setup.

Tested on route `'/script/:namespace?/:scriptname/edit'`

See also:
* #315 (comment) and forward
  • Loading branch information
Martii committed Nov 9, 2014
1 parent 98f5bda commit 982e642
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down Expand Up @@ -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());
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 982e642

Please sign in to comment.