mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 15:23:38 +01:00
Merge pull request #288 from vitobotta/master
Fix CORS error when IGNORE_IP is set
This commit is contained in:
commit
6539fd4016
@ -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…
Reference in New Issue
Block a user