@mars-stack/cli 8.0.13 → 8.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/src/proxy.ts +8 -1
package/package.json
CHANGED
package/template/src/proxy.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { decrypt } from '@mars-stack/core/auth/session';
|
|
2
2
|
import { createCSRFProtection } from '@mars-stack/core/auth/csrf';
|
|
3
|
+
import { appConfig } from '@/config/app.config';
|
|
3
4
|
import { routes } from '@/config/routes';
|
|
4
5
|
import { NextRequest, NextResponse } from 'next/server';
|
|
5
6
|
|
|
@@ -35,7 +36,13 @@ export async function proxy(request: NextRequest) {
|
|
|
35
36
|
return NextResponse.redirect(new URL('/coming-soon', request.url));
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
// When the coming-soon *feature* is generated, keep /coming-soon reachable for the waitlist page.
|
|
40
|
+
// Only redirect away when the route is not part of the scaffold (flag off).
|
|
41
|
+
if (
|
|
42
|
+
!isComingSoonMode &&
|
|
43
|
+
pathname === '/coming-soon' &&
|
|
44
|
+
!appConfig.features.comingSoon
|
|
45
|
+
) {
|
|
39
46
|
return NextResponse.redirect(new URL('/', request.url));
|
|
40
47
|
}
|
|
41
48
|
|