Fixed 301 redirect issue

This commit is contained in:
Starystars67 2023-12-06 20:40:01 +00:00
parent 696376662f
commit 8dcd6d723f
2 changed files with 2 additions and 2 deletions

View File

@ -24,11 +24,11 @@ function mainRoutes(router) {
router.get('/builds/launcher', function(req, res) {
if (req.query.download == 'true') {
//res.download('https://backend.beammp.com/builds/launcher?download=true')
const file = `${__dirname}/static/builds/launcher/launcher.exe`;
const file = `${__dirname}/builds/launcher/launcher.exe`;
res.download(file); // Set disposition and send it.
} else if (req.query.version == 'true') {
//res.redirect('https://backend.beammp.com/builds/launcher?version=true')
const file = `${__dirname}/static/builds/launcher/version.json`;
const file = `${__dirname}/builds/launcher/version.json`;
res.download(file); // Set disposition and send it.
} else {
//res.sendStatus(403)