This commit is contained in:
Pitu 2019-03-29 00:36:39 +09:00
parent 5df5751736
commit 9aba5cd221
1 changed files with 1 additions and 1 deletions

View File

@ -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 }));