mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Merge branch 'master' into jajaja
# Conflicts: # package.json # pnpm-lock.yaml # src/lib/detect.ts
This commit is contained in:
commit
5ed1d710cb
4 changed files with 5 additions and 4 deletions
|
|
@ -122,7 +122,7 @@ CREATE TABLE umami.website_event_stats_hourly
|
|||
min_time SimpleAggregateFunction(min, DateTime('UTC')),
|
||||
max_time SimpleAggregateFunction(max, DateTime('UTC')),
|
||||
tag SimpleAggregateFunction(groupArrayArray, Array(String)),
|
||||
distinct_id,
|
||||
distinct_id String,
|
||||
created_at Datetime('UTC')
|
||||
)
|
||||
ENGINE = AggregatingMergeTree
|
||||
|
|
@ -213,7 +213,7 @@ FROM (SELECT
|
|||
min(created_at) min_time,
|
||||
max(created_at) max_time,
|
||||
arrayFilter(x -> x != '', groupArray(tag)) tag,
|
||||
distinct_id String,
|
||||
distinct_id,
|
||||
toStartOfHour(created_at) timestamp
|
||||
FROM umami.website_event
|
||||
GROUP BY website_id,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const disableLogin = process.env.DISABLE_LOGIN;
|
|||
const disableUI = process.env.DISABLE_UI;
|
||||
const faviconURL = process.env.FAVICON_URL;
|
||||
const forceSSL = process.env.FORCE_SSL;
|
||||
const frameAncestors = process.env.ALLOWED_FRAME_URLS;
|
||||
const frameAncestors = process.env.ALLOWED_FRAME_URLS ?? '';
|
||||
const privateMode = process.env.PRIVATE_MODE;
|
||||
const trackerScriptName = process.env.TRACKER_SCRIPT_NAME;
|
||||
const trackerScriptURL = process.env.TRACKER_SCRIPT_URL;
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ export async function getLocation(ip: string = '', headers: Headers, hasPayloadI
|
|||
);
|
||||
}
|
||||
|
||||
const result = globalThis[MAXMIND].get(ip);
|
||||
const result = globalThis[MAXMIND].get(ip?.split(':')[0]);
|
||||
|
||||
if (result) {
|
||||
const country = result.country?.iso_code ?? result?.registered_country?.iso_code;
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@
|
|||
|
||||
try {
|
||||
const res = await fetch(endpoint, {
|
||||
keepalive: true,
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ type, payload }),
|
||||
headers: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue