diff --git a/applications/tempfiles/index.js b/applications/tempfiles/index.js index 267d375..6d39ff7 100644 --- a/applications/tempfiles/index.js +++ b/applications/tempfiles/index.js @@ -167,7 +167,7 @@ async function init () { // Simple URL validator try { let a = new URL(url) - if (a.protocol.indexOf('http') !== 0 || a.protocol.indexOf('ftp') !== -1) { + if (a.protocol.indexOf('http') !== 0 && a.protocol.indexOf('ftp') !== -1) { throw new Error('Unsupported protocol') } } catch (e) { @@ -200,6 +200,10 @@ async function init () { res.send(resp) }) + router.get('/shorten', (req, res) => { + res.send('