mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 07:13:37 +01:00
Truncate URL lengths.
This commit is contained in:
parent
efd53f8a03
commit
247afc8c33
@ -86,6 +86,8 @@ export const DESKTOP_SCREEN_WIDTH = 1920;
|
||||
export const LAPTOP_SCREEN_WIDTH = 1024;
|
||||
export const MOBILE_SCREEN_WIDTH = 479;
|
||||
|
||||
export const URL_LENGTH = 500;
|
||||
|
||||
export const DESKTOP_OS = [
|
||||
'Windows 3.11',
|
||||
'Windows 95',
|
||||
|
@ -1,7 +1,13 @@
|
||||
import moment from 'moment-timezone';
|
||||
import prisma from 'lib/db';
|
||||
import { subMinutes } from 'date-fns';
|
||||
import { MYSQL, POSTGRESQL, MYSQL_DATE_FORMATS, POSTGRESQL_DATE_FORMATS } from 'lib/constants';
|
||||
import {
|
||||
MYSQL,
|
||||
POSTGRESQL,
|
||||
MYSQL_DATE_FORMATS,
|
||||
POSTGRESQL_DATE_FORMATS,
|
||||
URL_LENGTH,
|
||||
} from 'lib/constants';
|
||||
|
||||
export function getDatabase() {
|
||||
const type =
|
||||
@ -190,8 +196,8 @@ export async function savePageView(website_id, session_id, url, referrer) {
|
||||
session_id,
|
||||
},
|
||||
},
|
||||
url,
|
||||
referrer,
|
||||
url: url.substr(0, URL_LENGTH),
|
||||
referrer: referrer.substr(0, URL_LENGTH),
|
||||
},
|
||||
}),
|
||||
);
|
||||
@ -211,7 +217,7 @@ export async function saveEvent(website_id, session_id, url, event_type, event_v
|
||||
session_id,
|
||||
},
|
||||
},
|
||||
url,
|
||||
url: url.substr(0, URL_LENGTH),
|
||||
event_type,
|
||||
event_value,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user