📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Added restriction on the black list of IP addresses
Yevhenii Kca226fb7fd53
diff --git a/src/project/project.service.ts b/src/project/project.service.tsindex 2740b62f6..11e5d6a13 100644--- a/src/project/project.service.ts+++ b/src/project/project.service.ts@@ -219,6 +219,7 @@ export class ProjectService {if (_size(projectDTO.name) > 50) throw new UnprocessableEntityException('The project name is too long')if (!_isArray(projectDTO.origins)) throw new UnprocessableEntityException('The list of allowed origins has to be an array of strings')if (_size(_join(projectDTO.origins, ',')) > 300) throw new UnprocessableEntityException('The list of allowed origins has to be smaller than 300 symbols')+ if (_size(_join(projectDTO.ipBlacklist, ',')) > 300) throw new UnprocessableEntityException('The list of allowed blacklisted IP addresses must be less than 300 characters.')}// Returns amount of existing events starting from month@@ -255,7 +256,7 @@ export class ProjectService {const customEvents = (await clickhouse.query(count_custom_ev_query).toPromise())[0]['count()']count = pageviews + customEvents-+await redis.set(countKey, `${pageviews}`, 'EX', redisProjectCountCacheTimeout)} else {try {