Skip to content

Commit

Permalink
HACK: Workaround TypeScript issue
Browse files Browse the repository at this point in the history
This appeared out of noewhere and we don't know why:
src/server/helpers/request.js(2,1): error TS9006: Declaration emit for this file requires using private name 'StaticEventEmitterOptions' from module '"events"'. An explicit type annotation may unblock declaration emit.
src/server/helpers/request.js(2,1): error TS9006: Declaration emit for this file requires using private name '_DOMEventTarget' from module '"events"'. An explicit type annotation may unblock declaration emit.
src/server/helpers/request.js(2,1): error TS9006: Declaration emit for this file requires using private name '_NodeEventTarget' from module '"events"'. An explicit type annotation may unblock declaration emit.
  • Loading branch information
dschmidt committed Jul 31, 2023
1 parent 12b705f commit 538f172
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/@uppy/companion/src/server/helpers/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ module.exports.validateURL = validateURL

/**
* Returns http Agent that will prevent requests to private IPs (to prevent SSRF)
*
* @returns {any}
*/
const getProtectedHttpAgent = ({ protocol, blockLocalIPs }) => {
function dnsLookup (hostname, options, callback) {
Expand Down

0 comments on commit 538f172

Please sign in to comment.