Skip to content

📈 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!

fixed

kruzhambus9cd6b07fc448
diff --git a/src/project/dto/project.dto.ts b/src/project/dto/project.dto.ts
index 32ded2ab0..4686431a0 100644
--- a/src/project/dto/project.dto.ts
+++ b/src/project/dto/project.dto.ts
@@ -23,7 +23,7 @@ export class ProjectDTO {
required: false,
description: 'An array allowed origins',
})
- origins: string[]
+ origins: string[] | null
@ApiProperty({
example: '::1,127.0.0.1,192.168.0.1/32',
diff --git a/src/project/project.service.ts b/src/project/project.service.ts
index 104326231..c7de0a529 100644
--- a/src/project/project.service.ts
+++ b/src/project/project.service.ts
@@ -220,7 +220,6 @@ export class ProjectService {
validateProject(projectDTO: ProjectDTO) {
if (!isValidPID(projectDTO.id)) throw new UnprocessableEntityException('The provided Project ID (pid) is incorrect')
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.')