@@ -60,6 +60,15 @@ const NEXT_PUBLIC_BASE_URL =
6060 ? "https://d1a1w7ulyz8ubg.cloudfront.net"
6161 : "http://localhost:3000" ;
6262
63+ const NEXT_PUBLIC_CDN_DOMAIN =
64+ $app . stage === "production"
65+ ? "https://cdn.joinhomefront.org"
66+ : $app . stage === "staging"
67+ ? "https://staging-cdn.joinhomefront.org"
68+ : $app . stage === "development"
69+ ? "https://d3t9degcpc8bgc.cloudfront.net"
70+ : "https://d3t9degcpc8bgc.cloudfront.net" ;
71+
6372function getDomain ( ) : NextjsArgs [ "domain" ] | undefined {
6473 switch ( $app . stage ) {
6574 // case "development":
@@ -124,6 +133,7 @@ export const nextjs = new sst.aws.Nextjs("Web", {
124133 ] ,
125134 environment : {
126135 NEXT_PUBLIC_BASE_URL ,
136+ NEXT_PUBLIC_CDN_DOMAIN ,
127137 NEXT_PUBLIC_PROTOMAPS_API_KEY ,
128138 NEXT_PUBLIC_STRIPE_BILLING_RETURN_URL ,
129139 NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY ,
@@ -145,7 +155,6 @@ export const nextjs = new sst.aws.Nextjs("Web", {
145155 STRIPE_HASH_KEY : stripeHashKey . value ,
146156 STRIPE_SECRET_KEY : stripeSecretKey . value ,
147157 STRIPE_WEBHOOK_SECRET : stripeWebhookSecret . value ,
148- NEXT_PUBLIC_CDN_DOMAIN : "https://d3t9degcpc8bgc.cloudfront.net" ,
149158 } ,
150159 vpc,
151160} ) ;
0 commit comments