mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-10 04:22:00 +10:00
fix: postgres and redis url validation (#548)
This commit is contained in:
@ -11,14 +11,22 @@ import { plainToInstance } from 'class-transformer';
|
||||
export class EnvironmentVariables {
|
||||
@IsNotEmpty()
|
||||
@IsUrl(
|
||||
{ protocols: ['postgres', 'postgresql'], require_tld: false },
|
||||
{
|
||||
protocols: ['postgres', 'postgresql'],
|
||||
require_tld: false,
|
||||
allow_underscores: true,
|
||||
},
|
||||
{ message: 'DATABASE_URL must be a valid postgres connection string' },
|
||||
)
|
||||
DATABASE_URL: string;
|
||||
|
||||
@IsNotEmpty()
|
||||
@IsUrl(
|
||||
{ protocols: ['redis', 'rediss'], require_tld: false },
|
||||
{
|
||||
protocols: ['redis', 'rediss'],
|
||||
require_tld: false,
|
||||
allow_underscores: true,
|
||||
},
|
||||
{ message: 'REDIS_URL must be a valid redis connection string' },
|
||||
)
|
||||
REDIS_URL: string;
|
||||
|
||||
Reference in New Issue
Block a user