feat: complete scheduled publishing, security remediation and DEV_TICKETS implementation
This commit is contained in:
1 parent
d6d4158cbe
commit
efb3c473c4
35 files changed
+685
-185
No files matched your search
@@ -9,7 +9,9 @@ export class RevalidationService {
|
||||
process.env.FRONTEND_INTERNAL_URL ||
|
||||
process.env.FRONTEND_URL ||
|
||||
process.env.NEXT_PUBLIC_SITE_URL ||
|
||||
(process.env.NODE_ENV === 'production' ? 'http://frontend_prod:8080' : 'http://localhost:3000');
|
||||
(process.env.NODE_ENV === 'production'
|
||||
? 'http://frontend_prod:8080'
|
||||
: 'http://localhost:3000');
|
||||
return raw.replace(/\/+$/, '');
|
||||
}
|
||||
|
||||
@@ -17,9 +19,13 @@ export class RevalidationService {
|
||||
const secret = process.env.REVALIDATION_SECRET;
|
||||
if (!secret) {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
throw new Error('REVALIDATION_SECRET is required in production environment.');
|
||||
throw new Error(
|
||||
'REVALIDATION_SECRET is required in production environment.',
|
||||
);
|
||||
}
|
||||
this.logger.warn('REVALIDATION_SECRET is not defined in environment variables.');
|
||||
this.logger.warn(
|
||||
'REVALIDATION_SECRET is not defined in environment variables.',
|
||||
);
|
||||
return '';
|
||||
}
|
||||
return secret;
|
||||
@@ -108,6 +114,7 @@ export class RevalidationService {
|
||||
this.revalidateTag('blogs'),
|
||||
this.revalidateTag('home-data'),
|
||||
this.revalidatePath('/blog'),
|
||||
this.revalidatePath('/sitemap.xml'),
|
||||
this.revalidatePath('/'),
|
||||
];
|
||||
|
||||
|
||||
Reference in new issue
Block a user