driverdan / node-XMLHttpRequest

XMLHttpRequest for node.js
http://thedanexperiment.com/2009/10/04/emulating-xmlhttprequest-in-node-js/
MIT License
416 stars 299 forks source link

It'd be nice if this package provides a way to limit what domains can be accessed. #159

Open sandersky opened 6 years ago

sandersky commented 6 years ago

I'd like to be able to turn off reading local files as well as limit which domains resources can be fetched from. Would there be any opposition to adding support for this and if you are open to it would you have a preferred API? I'm thinking essentially I'd like to be able to set a boolean for whether or not to work with local files as well as a regex to match requests against (regex is probably the most versatile as it could allow limiting by domain, sub-domain, set of domains, etc).