mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Fix CORS error when IGNORE_IP is set
This commit is contained in:
parent
a572441cc5
commit
89843f62ee
1 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,8 @@ 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'])) {
|
||||
return ok(res);
|
||||
}
|
||||
|
|
@ -19,7 +21,6 @@ export default async (req, res) => {
|
|||
}
|
||||
}
|
||||
|
||||
await useCors(req, res);
|
||||
await useSession(req, res);
|
||||
|
||||
const { type, payload } = req.body;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue