Use host header directly so it includes port

This commit is contained in:
Lamp 2020-04-02 19:11:26 -07:00 committed by GitHub
parent 8a59e178e8
commit f8bbfd1fd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -32,7 +32,7 @@ app.post("/upload", (req, res, next) => {
} catch(e) {
return next(e);
}
res.send(`${req.protocol}://${filecode}.${req.hostname}`);
res.send(`${req.protocol}://${filecode}.${req.headers.host}`);
});
});