4 ms·
Don't run this on EC2; you'll probably get your metadata stolen. Also: if (!validUrl.isUri(url)) { // Also protects against file://... It does? ▶ cat
by TomNomNom 9y ago
Don't run this on EC2; you'll probably get your metadata stolen. Also:
if (!validUrl.isUri(url)) { // Also protects against file://...
It does?
▶ cat valid.js
var validUrl = require('valid-url');
if (validUrl.isUri("file:///etc/passwd")){
console.log('Looks like a URI');
}
▶ node valid.js
Looks like a URI
Perhaps the problem requires a little more than 15 minutes to do well :)
- romanovcode 9y agoYeah, like 15 minutes more. Ergo my original statement - 30 minutes. As a bonus I would also stream binary data directly to client without creating an image file.
- davidpelayo 9y agook. congrats! While I would spend a few hours you would spend 30 minutes. However, this guy just published something to start making money, and it's working for him, no matter who is able to create what in how much time.