mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Minify: Don't ignore request headers in requestURI()
This commit is contained in:
parent
7a003cb9e2
commit
7efca7dc7d
1 changed files with 34 additions and 38 deletions
|
@ -48,10 +48,7 @@ const LIBRARY_WHITELIST = [
|
|||
|
||||
// What follows is a terrible hack to avoid loop-back within the server.
|
||||
// TODO: Serve files from another service, or directly from the file system.
|
||||
const requestURI = async (url, method, headers) => {
|
||||
var headers = {};
|
||||
|
||||
return await new Promise((resolve, reject) => {
|
||||
const requestURI = async (url, method, headers) => await new Promise((resolve, reject) => {
|
||||
const parsedURL = urlutil.parse(url);
|
||||
let status = 500;
|
||||
const content = [];
|
||||
|
@ -85,8 +82,7 @@ const requestURI = async (url, method, headers) => {
|
|||
},
|
||||
};
|
||||
minify(mockRequest, mockResponse).catch(reject);
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
const requestURIs = (locations, method, headers, callback) => {
|
||||
Promise.all(locations.map((loc) => requestURI(loc, method, headers))).then((responses) => {
|
||||
|
|
Loading…
Reference in a new issue