mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Event Data maximum size.
This commit is contained in:
parent
db6a6d6055
commit
eb2f07c105
2 changed files with 9 additions and 4 deletions
|
|
@ -39,6 +39,11 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => {
|
|||
return badRequest(res, 'Event Data must be in the form of a JSON Object.');
|
||||
}
|
||||
|
||||
// Validate eventData is less than 100kB
|
||||
if (eventData && new TextEncoder().encode(eventData).length / 1024 > 100) {
|
||||
return badRequest(res, 'Event Data exceeds maximum size of 100 kB.');
|
||||
}
|
||||
|
||||
const ignoreIps = process.env.IGNORE_IP;
|
||||
const ignoreHostnames = process.env.IGNORE_HOSTNAME;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue