Skip to content

Commit

Permalink
添加请求类型判断
Browse files Browse the repository at this point in the history
  • Loading branch information
keenwon committed Sep 7, 2016
1 parent af93d61 commit 056761b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jsonp.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function jsonp(app, options = {}) {
app.context.jsonp = function (data) {
var callback = this.query[callbackFn];

if (!callback) {
if (this.method !== 'GET' || !callback) {
return;
}

Expand Down

0 comments on commit 056761b

Please sign in to comment.