mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 15:23:38 +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 LAPTOP_SCREEN_WIDTH = 1024;
|
||||||
export const MOBILE_SCREEN_WIDTH = 479;
|
export const MOBILE_SCREEN_WIDTH = 479;
|
||||||
|
|
||||||
|
export const URL_LENGTH = 500;
|
||||||
|
|
||||||
export const DESKTOP_OS = [
|
export const DESKTOP_OS = [
|
||||||
'Windows 3.11',
|
'Windows 3.11',
|
||||||
'Windows 95',
|
'Windows 95',
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
import prisma from 'lib/db';
|
import prisma from 'lib/db';
|
||||||
import { subMinutes } from 'date-fns';
|
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() {
|
export function getDatabase() {
|
||||||
const type =
|
const type =
|
||||||
@ -190,8 +196,8 @@ export async function savePageView(website_id, session_id, url, referrer) {
|
|||||||
session_id,
|
session_id,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
url,
|
url: url.substr(0, URL_LENGTH),
|
||||||
referrer,
|
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,
|
session_id,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
url,
|
url: url.substr(0, URL_LENGTH),
|
||||||
event_type,
|
event_type,
|
||||||
event_value,
|
event_value,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user