aboutsummaryrefslogtreecommitdiff
path: root/src/api/structures/Server.js
diff options
context:
space:
mode:
authorPitu <[email protected]>2019-03-29 00:36:39 +0900
committerPitu <[email protected]>2019-03-29 00:36:39 +0900
commit9aba5cd2216b7daf48850f430919db69f4925713 (patch)
tree725399e157a08c0e4cbe8e6d4fa95d5b20cf8f35 /src/api/structures/Server.js
parentRemoved apikey from user object and added route for requesting a new one (diff)
downloadhost.fuwn.me-9aba5cd2216b7daf48850f430919db69f4925713.tar.xz
host.fuwn.me-9aba5cd2216b7daf48850f430919db69f4925713.zip
Fix
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 0dd22d7..d10abc9 100644
--- a/src/api/structures/Server.js
+++ b/src/api/structures/Server.js
@@ -27,7 +27,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.headers.accept === 'application/vnd.lolisafe.json') return next();
+ if (req.headers.accept.includes('application/vnd.lolisafe.json')) return next();
return res.status(405).json({ message: 'Incorrect `Accept` header provided' });
});
this.server.use(bodyParser.urlencoded({ extended: true }));