changes
This commit is contained in:
5
index.js
5
index.js
@@ -108,10 +108,7 @@ const upload = multer({
|
|||||||
|
|
||||||
router.post('/generate', async ctx => {
|
router.post('/generate', async ctx => {
|
||||||
const agent = ctx.get('user-agent')
|
const agent = ctx.get('user-agent')
|
||||||
if (!agent.includes('Kobo') && !agent.includes('Kindle')) {
|
|
||||||
console.error('Non-Kobo or Kindle device tried to generate a key: ' + agent)
|
|
||||||
ctx.throw(403)
|
|
||||||
}
|
|
||||||
let key = null
|
let key = null
|
||||||
let attempts = 0
|
let attempts = 0
|
||||||
console.log('There are currently', ctx.keys.size, 'key(s) in use.')
|
console.log('There are currently', ctx.keys.size, 'key(s) in use.')
|
||||||
|
|||||||
Reference in New Issue
Block a user