diff --git a/server/src/modules/apps/util-services/apps-import-export.util.service.ts b/server/src/modules/apps/util-services/apps-import-export.util.service.ts deleted file mode 100644 index 383ade1537..0000000000 --- a/server/src/modules/apps/util-services/apps-import-export.util.service.ts +++ /dev/null @@ -1 +0,0 @@ -//to do ? idk diff --git a/server/src/modules/auth/guards/external-api-security.guard.ts b/server/src/modules/auth/guards/external-api-security.guard.ts index 30918b232b..19b0d197a4 100644 --- a/server/src/modules/auth/guards/external-api-security.guard.ts +++ b/server/src/modules/auth/guards/external-api-security.guard.ts @@ -9,18 +9,18 @@ export class ExternalApiSecurityGuard implements CanActivate { const request = context.switchToHttp().getRequest(); // // Check if external API is enabled - // const isExternalApiEnabled = this.configService.get('ENABLE_EXTERNAL_API') === 'true'; - // if (!isExternalApiEnabled) { - // throw new ForbiddenException('External API is disabled'); - // } + const isExternalApiEnabled = this.configService.get('ENABLE_EXTERNAL_API') === 'true'; + if (!isExternalApiEnabled) { + throw new ForbiddenException('External API is disabled'); + } - // // // Check the authorization header - // const authHeader = request.headers['authorization']; - // const externalApiAccessToken = this.configService.get('EXTERNAL_API_ACCESS_TOKEN'); + // // Check the authorization header + const authHeader = request.headers['authorization']; + const externalApiAccessToken = this.configService.get('EXTERNAL_API_ACCESS_TOKEN'); - // if (!authHeader || authHeader !== `Basic ${externalApiAccessToken}`) { - // throw new ForbiddenException('Unauthorized'); - // } + if (!authHeader || authHeader !== `Basic ${externalApiAccessToken}`) { + throw new ForbiddenException('Unauthorized'); + } return true; }