diff --git a/src/app.ts b/src/app.ts index 6275680..fd947b8 100644 --- a/src/app.ts +++ b/src/app.ts @@ -8,7 +8,15 @@ const app = express(); app.use(morgan('common')) app.get('/*', async (req, res) => { - const target = req.url.slice(1); + const rawTarget = req.url.slice(1); + + let target: string; + if (!rawTarget.includes('://')) { + target = 'http://' + rawTarget; + } + else { + target = rawTarget; + } const location = await getLocationOfTarget(target); if (location) {