Permalink
Browse files

change jsonp callback default to false. Closes #1304

  • Loading branch information...
1 parent 87468cf commit f2d7bbe0e9b6615894df72abe162aa77ff511bd8 @tj tj committed Aug 28, 2012
Showing with 6 additions and 2 deletions.
  1. +0 −1 lib/application.js
  2. +6 −1 test/res.json.js
View
@@ -82,7 +82,6 @@ app.defaultConfiguration = function(){
this.locals.settings = this.settings;
// default configuration
- this.enable('jsonp callback');
this.set('jsonp callback name', 'callback');
this.configure('development', function(){
View
@@ -9,6 +9,8 @@ describe('res', function(){
it('should respond with jsonp', function(done){
var app = express();
+ app.enable('jsonp callback');
+
app.use(function(req, res){
res.json({ count: 1 });
});
@@ -24,8 +26,10 @@ describe('res', function(){
it('should allow renaming callback', function(done){
var app = express();
-
+
+ app.enable('jsonp callback');
app.set('jsonp callback name', 'clb');
+
app.use(function(req, res){
res.json({ count: 1 });
});
@@ -42,6 +46,7 @@ describe('res', function(){
it('should allow []', function(done){
var app = express();
+ app.enable('jsonp callback');
app.use(function(req, res){
res.json({ count: 1 });
});

0 comments on commit f2d7bbe

Please sign in to comment.