mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
support jsonp api calls
This commit is contained in:
parent
84f1baf972
commit
b58bdb4e4d
1 changed files with 5 additions and 0 deletions
|
@ -290,6 +290,11 @@ async.waterfall([
|
|||
{
|
||||
response = JSON.stringify(response);
|
||||
apiLogger.info("RESPONSE, " + req.params.func + ", " + response);
|
||||
|
||||
//is this a jsonp call, if yes, add the function call
|
||||
if(req.query.jsonp)
|
||||
response = req.query.jsonp + "(" + response + ")";
|
||||
|
||||
res._send(response);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue