pull/29/head
Matthew 2020-10-21 16:36:24 -04:00
parent cffa0d1d30
commit 9be8c9da7e
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 1 additions and 1 deletions

View File

@ -355,7 +355,7 @@ export default class Report extends Route {
this.router.get('/web', async (req, res) => { this.router.get('/web', async (req, res) => {
try { try {
res.setHeader('Access-Control-Allow-Origin', 'report.libraryofcode.org'); res.setHeader('Access-Control-Allow-Origin', '*');
if (this.timeout.has(req.ip)) return res.status(401).json({ code: this.constants.codes.UNAUTHORIZED, message: this.constants.messages.UNAUTHORIZED }); if (this.timeout.has(req.ip)) return res.status(401).json({ code: this.constants.codes.UNAUTHORIZED, message: this.constants.messages.UNAUTHORIZED });
if (!req.query.pin) return res.status(401).json({ code: this.constants.codes.UNAUTHORIZED, message: this.constants.messages.UNAUTHORIZED }); if (!req.query.pin) return res.status(401).json({ code: this.constants.codes.UNAUTHORIZED, message: this.constants.messages.UNAUTHORIZED });
const args = req.query.pin.toString(); const args = req.query.pin.toString();