mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Updated bot detection library.
This commit is contained in:
parent
e5ff182302
commit
fb711d58f1
3 changed files with 8 additions and 8 deletions
|
|
@ -1,14 +1,14 @@
|
|||
import isBot from 'isbot-fast';
|
||||
import isbot from 'isbot';
|
||||
import { savePageView, saveEvent } from 'lib/queries';
|
||||
import { useCors, useSession } from 'lib/middleware';
|
||||
import { getIpAddress } from 'lib/request';
|
||||
import { ok, badRequest } from 'lib/response';
|
||||
import { createToken } from 'lib/crypto';
|
||||
import { getIpAddress } from '../../lib/request';
|
||||
|
||||
export default async (req, res) => {
|
||||
await useCors(req, res);
|
||||
|
||||
if (isBot(req.headers['user-agent'])) {
|
||||
if (isbot(req.headers['user-agent'])) {
|
||||
return ok(res);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue