Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/ass/commit/bdd58ad6c4a3480ef9f45e8abf49f7c829a173a3?style=split&whitespace=show-all You should set ROOT_URL correctly, otherwise the web may not work correctly.

cool user agent detection thing for discords shitty devs

pull/12/head
tycrek 4 years ago
parent a62a9bf49f
commit bdd58ad6c4
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -65,7 +65,7 @@ function startup() {
// View file // View file
app.get('/:resourceId', (req, res) => { app.get('/:resourceId', (req, res) => {
log(req.useragent); log('Is bot: ' + (req.useragent.isBot == 'discordbot'));
let resourceId = req.params.resourceId.split('.')[0]; let resourceId = req.params.resourceId.split('.')[0];
if (data[resourceId] && data[resourceId].mimetype == 'video/mp4' && req.params.resourceId.split('.')[1] != 'mp4') return res.redirect(req.url + '.mp4'); if (data[resourceId] && data[resourceId].mimetype == 'video/mp4' && req.params.resourceId.split('.')[1] != 'mp4') return res.redirect(req.url + '.mp4');
let fileData = fs.readFileSync(path(data[resourceId].path)); let fileData = fs.readFileSync(path(data[resourceId].path));

Loading…
Cancel
Save