@@ -268,6 +268,7 @@ export class StacksCloud extends Stack {
268
268
269
269
manageCdn ( ) {
270
270
const originAccessIdentity = new cloudfront . OriginAccessIdentity ( this , 'OAI' )
271
+
271
272
const cdnCachePolicy = new cloudfront . CachePolicy ( this , 'cdnCachePolicy' , {
272
273
comment : 'Custom Stacks CDN Cache Policy' ,
273
274
cachePolicyName : 'cdnCachePolicy' ,
@@ -276,6 +277,7 @@ export class StacksCloud extends Stack {
276
277
maxTtl : cloud . cdn ?. maxTtl ? Duration . seconds ( cloud . cdn . maxTtl ) : undefined ,
277
278
cookieBehavior : this . getCookieBehavior ( cloud . cdn ?. cookieBehavior ) ,
278
279
} )
280
+
279
281
const cdn = new cloudfront . Distribution ( this , 'Distribution' , {
280
282
domainNames : [ this . domain ] ,
281
283
defaultRootObject : 'index.html' ,
@@ -301,10 +303,7 @@ export class StacksCloud extends Stack {
301
303
cachePolicy : this . cdnCachePolicy ,
302
304
} ,
303
305
304
- additionalBehaviors : this . generateAdditionalBehaviors ( {
305
- docsBucket : this . storage . privateBucket ,
306
- originAccessIdentity : this . originAccessIdentity ,
307
- } ) ,
306
+ additionalBehaviors : this . generateAdditionalBehaviors ( ) ,
308
307
} )
309
308
310
309
return { cdn, originAccessIdentity, cdnCachePolicy }
@@ -361,13 +360,18 @@ export class StacksCloud extends Stack {
361
360
description : 'The URL of the deployed application' ,
362
361
} )
363
362
364
- new Output ( this , 'VanityUrl ' , {
363
+ new Output ( this , 'AppVanityUrl ' , {
365
364
value : this . vanityUrl ,
366
365
description : 'The vanity URL of the deployed application' ,
367
366
} )
368
367
368
+ new Output ( this , 'ApiUrl' , {
369
+ value : `https://${ this . apiDomain } ` ,
370
+ description : 'The URL of the deployed application' ,
371
+ } )
372
+
369
373
if ( this . apiVanityUrl ) {
370
- new Output ( this , 'ServerVanityUrl ' , {
374
+ new Output ( this , 'ApiVanityUrl ' , {
371
375
value : this . apiVanityUrl ,
372
376
description : 'The vanity URL of the deployed Stacks server.' ,
373
377
} )
0 commit comments