Skip to content

Commit

Permalink
fix: manually defined internal secret key
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Nov 7, 2024
1 parent 6972087 commit 0faca84
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .source
2 changes: 1 addition & 1 deletion apps/api/src/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ CLERK_PEM_PUBLIC_KEY=
TUNNEL_BASE_ADDRESS=example.com
API_ROOT_URL=http://localhost:1337
PLAIN_SUPPORT_KEY='PLAIN_SUPPORT_KEY'
NOVU_SECRET_KEY=test
NOVU_INTERNAL_SECRET_KEY=test
7 changes: 6 additions & 1 deletion apps/api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { DynamicModule, Logger, Module, Provider } from '@nestjs/common';
import { APP_INTERCEPTOR } from '@nestjs/core';
import { ProfilingModule, TracingModule } from '@novu/application-generic';
import { NovuModule } from '@novu/framework/nest';
import { Client, NovuModule } from '@novu/framework/nest';

import { Type } from '@nestjs/common/interfaces/type.interface';
import { ForwardReference } from '@nestjs/common/interfaces/modules/forward-reference.interface';
Expand Down Expand Up @@ -157,6 +157,11 @@ if (process.env.NODE_ENV === 'test') {
modules.push(
NovuModule.register({
apiPath: '/api/novu',
client: new Client({
secretKey: process.env.NOVU_INTERNAL_SECRET_KEY,
strictAuthentication:
process.env.NODE_ENV === 'production' || process.env.NOVU_STRICT_AUTHENTICATION_ENABLED === 'true',
}),
controllerDecorators: [ApiExcludeController()],
workflows: [usageLimitsWorkflow],
})
Expand Down

0 comments on commit 0faca84

Please sign in to comment.