mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Fix issue with sendBeacon request.
This commit is contained in:
parent
48db7708de
commit
17790aa5a8
6 changed files with 23 additions and 22 deletions
|
|
@ -86,3 +86,11 @@ export async function getClientInfo(req, { screen }) {
|
|||
|
||||
return { userAgent, browser, os, ip, country, device };
|
||||
}
|
||||
|
||||
export function getJsonBody(req) {
|
||||
if (req.headers['content-type'].indexOf('text/plain') !== -1) {
|
||||
return JSON.parse(req.body);
|
||||
}
|
||||
|
||||
return req.body;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue