mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
api: drop JSONP (#4835)
* api: drop JSONP * docs: drop JSONP * tests: drop JSONP * api: remove isValidJSONPName require
This commit is contained in:
parent
85231cb774
commit
0f16e518ff
4 changed files with 0 additions and 109 deletions
|
@ -22,7 +22,6 @@ const createHTTPError = require('http-errors');
|
|||
|
||||
const apiHandler = require('../../handler/APIHandler');
|
||||
const settings = require('../../utils/Settings');
|
||||
const isValidJSONPName = require('./isValidJSONPName');
|
||||
|
||||
const log4js = require('log4js');
|
||||
const logger = log4js.getLogger('API');
|
||||
|
@ -686,12 +685,6 @@ exports.expressCreateServer = (hookName, args, cb) => {
|
|||
}
|
||||
}
|
||||
|
||||
// support jsonp response format
|
||||
if (req.query.jsonp && isValidJSONPName.check(req.query.jsonp)) {
|
||||
res.header('Content-Type', 'application/javascript');
|
||||
response = `${req.query.jsonp}(${JSON.stringify(response)})`;
|
||||
}
|
||||
|
||||
// send response
|
||||
return res.send(response);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue