aboutsummaryrefslogtreecommitdiff
path: root/src/api/structures/Server.js
diff options
context:
space:
mode:
authorPitu <[email protected]>2019-09-30 07:06:22 +0000
committerPitu <[email protected]>2019-09-30 07:06:22 +0000
commit8e4f1b7838e3c43320f2e25e691c1808ae3c4089 (patch)
tree8549876e179dd9e636eb6a72cb7f8f630f6d315e /src/api/structures/Server.js
parentAdd parallel chunks and raise timeout (diff)
downloadhost.fuwn.me-8e4f1b7838e3c43320f2e25e691c1808ae3c4089.tar.xz
host.fuwn.me-8e4f1b7838e3c43320f2e25e691c1808ae3c4089.zip
feature: album links
Diffstat (limited to 'src/api/structures/Server.js')
-rw-r--r--src/api/structures/Server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/structures/Server.js b/src/api/structures/Server.js
index f8c6ad1..50f6754 100644
--- a/src/api/structures/Server.js
+++ b/src/api/structures/Server.js
@@ -26,7 +26,7 @@ class Server {
/*
This bypasses the headers.accept for album download, since it's accesed directly through the browser.
*/
- if (req.url.includes('/api/album/') && req.url.includes('/zip') && req.method === 'GET') return next();
+ if ((req.url.includes('/api/album/') || req.url.includes('/zip')) && req.method === 'GET') return next();
if (req.headers.accept && req.headers.accept.includes('application/vnd.lolisafe.json')) return next();
return res.status(405).json({ message: 'Incorrect `Accept` header provided' });
});