feat: add some security
This commit is contained in:
@@ -2,4 +2,11 @@ import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('app', () => ({
|
||||
environment: process.env.NODE_ENV || 'production',
|
||||
corsOrigins: process.env.CORS_ORIGINS?.split(',').map((origin) =>
|
||||
origin.trim(),
|
||||
),
|
||||
corsSubdomain: process.env.CORS_SUBDOMAIN,
|
||||
swaggerServers: process.env.SWAGGER_SERVERS?.split(',').map((origin) =>
|
||||
origin.trim(),
|
||||
),
|
||||
}));
|
||||
|
||||
@@ -18,4 +18,7 @@ export default Joi.object({
|
||||
JWT_AUDIENCE: Joi.string().required(),
|
||||
REDIS_HOST: Joi.string().required(),
|
||||
REDIS_PORT: Joi.number().port().default(6379),
|
||||
CORS_ORIGINS: Joi.string().required(),
|
||||
CORS_SUBDOMAIN: Joi.string().required(),
|
||||
SWAGGER_SERVERS: Joi.string().required(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user