cdk-nuxt 2.4.0 → 2.5.0
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/README.md +133 -46
- package/lib/cli/deploy-server.js +9 -2
- package/lib/cli/destroy-server.js +8 -1
- package/lib/functions/access-logs-analysis/group-by-date/package.json +20 -19
- package/lib/functions/access-logs-analysis/group-by-date/pnpm-lock.yaml +1385 -0
- package/lib/functions/access-logs-analysis/partitioning/package.json +20 -19
- package/lib/functions/access-logs-analysis/partitioning/pnpm-lock.yaml +1122 -0
- package/lib/functions/assets-cleanup/package.json +19 -18
- package/lib/functions/assets-cleanup/pnpm-lock.yaml +1377 -0
- package/lib/stack/access-logs-analysis/AccessLogsAnalysis.js +19 -4
- package/lib/stack/access-logs-analysis/AccessLogsAnalysis.ts +23 -5
- package/lib/stack/server/NuxtServerAppStack.d.ts +18 -3
- package/lib/stack/server/NuxtServerAppStack.js +56 -20
- package/lib/stack/server/NuxtServerAppStack.ts +76 -24
- package/lib/stack/server/NuxtServerAppStackProps.d.ts +73 -0
- package/lib/stack/server/NuxtServerAppStackProps.js +1 -1
- package/lib/stack/server/NuxtServerAppStackProps.ts +80 -0
- package/lib/templates/stack-index-server.ts +60 -24
- package/package.json +44 -42
- package/lib/functions/access-logs-analysis/group-by-date/.gitignore +0 -2
- package/lib/functions/access-logs-analysis/group-by-date/build/app/index.d.ts +0 -2
- package/lib/functions/access-logs-analysis/group-by-date/build/app/index.js +0 -57
- package/lib/functions/access-logs-analysis/group-by-date/build/app/index.js.map +0 -1
- package/lib/functions/access-logs-analysis/group-by-date/yarn.lock +0 -1253
- package/lib/functions/access-logs-analysis/partitioning/.gitignore +0 -2
- package/lib/functions/access-logs-analysis/partitioning/build/app/create-partition.d.ts +0 -1
- package/lib/functions/access-logs-analysis/partitioning/build/app/create-partition.js +0 -57
- package/lib/functions/access-logs-analysis/partitioning/build/app/create-partition.js.map +0 -1
- package/lib/functions/access-logs-analysis/partitioning/build/app/transform-partition.d.ts +0 -2
- package/lib/functions/access-logs-analysis/partitioning/build/app/transform-partition.js +0 -72
- package/lib/functions/access-logs-analysis/partitioning/build/app/transform-partition.js.map +0 -1
- package/lib/functions/access-logs-analysis/partitioning/build/app/types.d.ts +0 -7
- package/lib/functions/access-logs-analysis/partitioning/build/app/types.js +0 -3
- package/lib/functions/access-logs-analysis/partitioning/build/app/types.js.map +0 -1
- package/lib/functions/access-logs-analysis/partitioning/build/app/util.d.ts +0 -9
- package/lib/functions/access-logs-analysis/partitioning/build/app/util.js +0 -44
- package/lib/functions/access-logs-analysis/partitioning/build/app/util.js.map +0 -1
- package/lib/functions/access-logs-analysis/partitioning/yarn.lock +0 -1009
- package/lib/functions/assets-cleanup/.gitignore +0 -2
- package/lib/functions/assets-cleanup/build/app/index.d.ts +0 -1
- package/lib/functions/assets-cleanup/build/app/index.js +0 -114
- package/lib/functions/assets-cleanup/build/app/index.js.map +0 -1
- package/lib/functions/assets-cleanup/yarn.lock +0 -1245
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
Distribution, HttpVersion,
|
|
13
13
|
type IOriginAccessIdentity,
|
|
14
14
|
OriginAccessIdentity,
|
|
15
|
-
OriginProtocolPolicy,
|
|
15
|
+
OriginProtocolPolicy, OriginRequestPolicy,
|
|
16
16
|
PriceClass,
|
|
17
17
|
SecurityPolicyProtocol,
|
|
18
|
-
ViewerProtocolPolicy
|
|
18
|
+
ViewerProtocolPolicy,OriginRequestCookieBehavior, OriginRequestHeaderBehavior, OriginRequestQueryStringBehavior
|
|
19
19
|
} from "aws-cdk-lib/aws-cloudfront";
|
|
20
20
|
import {Architecture, Code, Function, Runtime, Tracing} from "aws-cdk-lib/aws-lambda";
|
|
21
21
|
import {
|
|
@@ -29,18 +29,16 @@ import {AaaaRecord, ARecord, HostedZone, type IHostedZone, RecordTarget} from "a
|
|
|
29
29
|
import {BucketDeployment, Source, StorageClass} from "aws-cdk-lib/aws-s3-deployment";
|
|
30
30
|
import {HttpOrigin, S3BucketOrigin} from "aws-cdk-lib/aws-cloudfront-origins";
|
|
31
31
|
import {CloudFrontTarget} from "aws-cdk-lib/aws-route53-targets";
|
|
32
|
-
import {
|
|
33
|
-
import {RetentionDays} from "aws-cdk-lib/aws-logs";
|
|
32
|
+
import { LogGroup, RetentionDays } from "aws-cdk-lib/aws-logs";
|
|
34
33
|
import {getNuxtAppStaticAssetConfigs, type StaticAssetConfig} from "../NuxtAppStaticAssets";
|
|
35
|
-
import * as fs from "fs";
|
|
36
34
|
import {Rule, RuleTargetInput, Schedule} from "aws-cdk-lib/aws-events";
|
|
37
35
|
import {LambdaFunction} from "aws-cdk-lib/aws-events-targets";
|
|
38
36
|
import * as path from "path";
|
|
39
|
-
import {writeFileSync} from "fs";
|
|
37
|
+
import {writeFileSync, mkdirSync, existsSync} from "fs";
|
|
40
38
|
import {type NuxtServerAppStackProps} from "./NuxtServerAppStackProps";
|
|
41
39
|
import {CloudFrontAccessLogsAnalysis} from "../access-logs-analysis/CloudFrontAccessLogsAnalysis";
|
|
42
40
|
import {HttpLambdaIntegration} from "aws-cdk-lib/aws-apigatewayv2-integrations";
|
|
43
|
-
import {DomainName, EndpointType, HttpApi, SecurityPolicy} from "aws-cdk-lib/aws-apigatewayv2";
|
|
41
|
+
import {DomainName, EndpointType, HttpApi, HttpMethod, SecurityPolicy} from "aws-cdk-lib/aws-apigatewayv2";
|
|
44
42
|
|
|
45
43
|
/**
|
|
46
44
|
* CDK stack to deploy a dynamic Nuxt app (target=server) on AWS with Lambda, ApiGateway, S3 and CloudFront.
|
|
@@ -118,10 +116,23 @@ export class NuxtServerAppStack extends Stack {
|
|
|
118
116
|
private httpOrigin: HttpOrigin;
|
|
119
117
|
|
|
120
118
|
/**
|
|
121
|
-
* The cache policy
|
|
119
|
+
* The cache policy that specifies which HTTP headers, cookies, and query strings
|
|
120
|
+
* CloudFront forwards to the Nuxt app and uses to generate a cache key.
|
|
122
121
|
*/
|
|
123
122
|
private appCachePolicy: CachePolicy;
|
|
124
123
|
|
|
124
|
+
/**
|
|
125
|
+
* The origin request policy that specifies which HTTP headers, cookies, and query strings
|
|
126
|
+
* CloudFront forwards to the Nuxt app without affecting the cache key.
|
|
127
|
+
*/
|
|
128
|
+
private appRequestPolicy: OriginRequestPolicy;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The behavior for the CloudFront distribution to route incoming web requests
|
|
132
|
+
* to the Nuxt Lambda function (via API gateway).
|
|
133
|
+
*/
|
|
134
|
+
private nuxtServerRouteBehavior: BehaviorOptions;
|
|
135
|
+
|
|
125
136
|
/**
|
|
126
137
|
* The CloudFront distribution to route incoming requests to the Nuxt Lambda function (via the API gateway)
|
|
127
138
|
* or the S3 assets folder (with caching).
|
|
@@ -154,6 +165,8 @@ export class NuxtServerAppStack extends Stack {
|
|
|
154
165
|
this.apiGateway = this.createApiGateway(props);
|
|
155
166
|
this.httpOrigin = this.createNuxtAppHttpOrigin();
|
|
156
167
|
this.appCachePolicy = this.createNuxtAppCachePolicy(props)
|
|
168
|
+
this.appRequestPolicy = this.createNuxtAppRequestPolicy(props)
|
|
169
|
+
this.nuxtServerRouteBehavior = this.createNuxtServerRouteBehavior()
|
|
157
170
|
this.cdn = this.createCloudFrontDistribution(props);
|
|
158
171
|
this.configureDeployments();
|
|
159
172
|
this.createDnsRecords(props);
|
|
@@ -169,10 +182,11 @@ export class NuxtServerAppStack extends Stack {
|
|
|
169
182
|
* and returns the current revision.
|
|
170
183
|
*/
|
|
171
184
|
private createDeploymentRevision(props: NuxtServerAppStackProps): string {
|
|
172
|
-
const revisionFilePath = `${props.rootDir ?? '.'}/.output/public/app-revision`;
|
|
173
185
|
const appRevision = new Date().toISOString();
|
|
174
186
|
|
|
175
|
-
|
|
187
|
+
const dir = path.join(props.rootDir ?? '.', '.output', 'public');
|
|
188
|
+
mkdirSync(dir, { recursive: true });
|
|
189
|
+
writeFileSync(path.join(dir, 'app-revision'), appRevision, { encoding: 'utf-8' });
|
|
176
190
|
|
|
177
191
|
return appRevision;
|
|
178
192
|
}
|
|
@@ -239,6 +253,12 @@ export class NuxtServerAppStack extends Stack {
|
|
|
239
253
|
private createAppLambdaFunction(props: NuxtServerAppStackProps): Function {
|
|
240
254
|
const funcName = `${this.resourceIdPrefix}-app-function`;
|
|
241
255
|
|
|
256
|
+
const appLogGroup = new LogGroup(this, `${funcName}-logs`, {
|
|
257
|
+
logGroupName: `/aws/lambda/${funcName}`,
|
|
258
|
+
retention: RetentionDays.ONE_MONTH,
|
|
259
|
+
});
|
|
260
|
+
appLogGroup.applyRemovalPolicy(RemovalPolicy.DESTROY);
|
|
261
|
+
|
|
242
262
|
return new Function(this, funcName, {
|
|
243
263
|
functionName: funcName,
|
|
244
264
|
description: `Renders the ${this.resourceIdPrefix} Nuxt app.`,
|
|
@@ -250,9 +270,9 @@ export class NuxtServerAppStack extends Stack {
|
|
|
250
270
|
}),
|
|
251
271
|
timeout: Duration.seconds(10),
|
|
252
272
|
memorySize: props.memorySize ?? 1792,
|
|
253
|
-
logRetention: RetentionDays.ONE_MONTH,
|
|
254
273
|
allowPublicSubnet: false,
|
|
255
274
|
tracing: props.enableTracing ? Tracing.ACTIVE : Tracing.DISABLED,
|
|
275
|
+
logGroup: appLogGroup,
|
|
256
276
|
environment: {
|
|
257
277
|
NODE_OPTIONS: '--enable-source-maps',
|
|
258
278
|
...JSON.parse(props.entrypointEnv ?? '{}'),
|
|
@@ -269,6 +289,12 @@ export class NuxtServerAppStack extends Stack {
|
|
|
269
289
|
const functionName: string = `${this.resourceIdPrefix}-cleanup-function`;
|
|
270
290
|
const functionDirPath = path.join(__dirname, '../../functions/assets-cleanup');
|
|
271
291
|
|
|
292
|
+
const cleanupLogGroup = new LogGroup(this, `${functionName}-logs`, {
|
|
293
|
+
logGroupName: `/aws/lambda/${functionName}`,
|
|
294
|
+
retention: RetentionDays.TWO_WEEKS,
|
|
295
|
+
});
|
|
296
|
+
cleanupLogGroup.applyRemovalPolicy(RemovalPolicy.DESTROY);
|
|
297
|
+
|
|
272
298
|
const result: Function = new Function(this, functionName, {
|
|
273
299
|
functionName: functionName,
|
|
274
300
|
description: `Auto-deletes the outdated static assets in the ${this.staticAssetsBucket.bucketName} S3 bucket.`,
|
|
@@ -280,7 +306,6 @@ export class NuxtServerAppStack extends Stack {
|
|
|
280
306
|
}),
|
|
281
307
|
timeout: Duration.minutes(5),
|
|
282
308
|
memorySize: 128,
|
|
283
|
-
logRetention: RetentionDays.TWO_WEEKS,
|
|
284
309
|
environment: {
|
|
285
310
|
STATIC_ASSETS_BUCKET: this.staticAssetsBucket.bucketName,
|
|
286
311
|
OUTDATED_ASSETS_RETENTION_DAYS: `${props.outdatedAssetsRetentionDays ?? 30}`,
|
|
@@ -288,6 +313,7 @@ export class NuxtServerAppStack extends Stack {
|
|
|
288
313
|
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1',
|
|
289
314
|
NODE_OPTIONS: '--enable-source-maps',
|
|
290
315
|
},
|
|
316
|
+
logGroup: cleanupLogGroup,
|
|
291
317
|
});
|
|
292
318
|
|
|
293
319
|
// grant function access to S3 bucket
|
|
@@ -330,7 +356,15 @@ export class NuxtServerAppStack extends Stack {
|
|
|
330
356
|
apiGateway.addRoutes({
|
|
331
357
|
integration: lambdaIntegration,
|
|
332
358
|
path: '/{proxy+}',
|
|
333
|
-
methods: [
|
|
359
|
+
methods: [
|
|
360
|
+
HttpMethod.GET,
|
|
361
|
+
HttpMethod.HEAD,
|
|
362
|
+
HttpMethod.OPTIONS,
|
|
363
|
+
HttpMethod.POST,
|
|
364
|
+
HttpMethod.PUT,
|
|
365
|
+
HttpMethod.PATCH,
|
|
366
|
+
HttpMethod.DELETE,
|
|
367
|
+
],
|
|
334
368
|
});
|
|
335
369
|
|
|
336
370
|
return apiGateway;
|
|
@@ -352,12 +386,12 @@ export class NuxtServerAppStack extends Stack {
|
|
|
352
386
|
minimumProtocolVersion: SecurityPolicyProtocol.TLS_V1_2_2018,
|
|
353
387
|
certificate: Certificate.fromCertificateArn(this, `${this.resourceIdPrefix}-global-certificate`, props.globalTlsCertificateArn),
|
|
354
388
|
httpVersion: HttpVersion.HTTP2_AND_3,
|
|
355
|
-
defaultBehavior: this.
|
|
389
|
+
defaultBehavior: this.nuxtServerRouteBehavior,
|
|
356
390
|
additionalBehaviors: this.setupCloudFrontRouting(props),
|
|
357
391
|
priceClass: PriceClass.PRICE_CLASS_100, // Use only North America and Europe
|
|
358
392
|
logBucket: this.accessLogsBucket,
|
|
359
393
|
logFilePrefix: props.enableAccessLogsAnalysis ? CloudFrontAccessLogsAnalysis.getLogFilePrefix() : undefined,
|
|
360
|
-
logIncludesCookies:
|
|
394
|
+
logIncludesCookies: props.enableAccessLogsAnalysis,
|
|
361
395
|
});
|
|
362
396
|
}
|
|
363
397
|
|
|
@@ -378,19 +412,23 @@ export class NuxtServerAppStack extends Stack {
|
|
|
378
412
|
* to the Nuxt render Lambda function (via API gateway).
|
|
379
413
|
* Additionally, this automatically redirects HTTP requests to HTTPS.
|
|
380
414
|
*/
|
|
381
|
-
private
|
|
415
|
+
private createNuxtServerRouteBehavior(): BehaviorOptions {
|
|
382
416
|
return {
|
|
383
417
|
origin: this.httpOrigin,
|
|
384
418
|
allowedMethods: AllowedMethods.ALLOW_GET_HEAD,
|
|
385
419
|
compress: true,
|
|
386
420
|
viewerProtocolPolicy: ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
|
|
387
|
-
originRequestPolicy:
|
|
421
|
+
originRequestPolicy: this.appRequestPolicy,
|
|
388
422
|
cachePolicy: this.appCachePolicy
|
|
389
423
|
};
|
|
390
424
|
}
|
|
391
425
|
|
|
392
426
|
private setupCloudFrontRouting(props: NuxtServerAppStackProps): Record<string, BehaviorOptions> {
|
|
393
|
-
let routingBehaviours: Record<string, BehaviorOptions> = {
|
|
427
|
+
let routingBehaviours: Record<string, BehaviorOptions> = {
|
|
428
|
+
|
|
429
|
+
// Nuxt I18n files are served via a server route
|
|
430
|
+
'/_i18n/*': this.nuxtServerRouteBehavior,
|
|
431
|
+
};
|
|
394
432
|
|
|
395
433
|
// Specific ones first
|
|
396
434
|
if (props.enableApi) {
|
|
@@ -415,14 +453,27 @@ export class NuxtServerAppStack extends Stack {
|
|
|
415
453
|
defaultTtl: Duration.seconds(0),
|
|
416
454
|
minTtl: Duration.seconds(0),
|
|
417
455
|
maxTtl: Duration.days(365),
|
|
418
|
-
queryStringBehavior: props.allowQueryParams?.length ? CacheQueryStringBehavior.allowList(...props.allowQueryParams) : (props.denyQueryParams?.length ? CacheQueryStringBehavior.denyList(...props.denyQueryParams) : CacheQueryStringBehavior.all()),
|
|
419
|
-
headerBehavior: props.allowHeaders?.length ? CacheHeaderBehavior.allowList(...props.allowHeaders) : CacheHeaderBehavior.none(),
|
|
420
|
-
cookieBehavior: props.allowCookies?.length ? CacheCookieBehavior.allowList(...props.allowCookies) : CacheCookieBehavior.none(),
|
|
456
|
+
queryStringBehavior: props.cacheKeyQueryParams?.length ? CacheQueryStringBehavior.allowList(...props.cacheKeyQueryParams) : (props.denyCacheKeyQueryParams?.length ? CacheQueryStringBehavior.denyList(...props.denyCacheKeyQueryParams) : (props.allowQueryParams?.length ? CacheQueryStringBehavior.allowList(...props.allowQueryParams) : (props.denyQueryParams?.length ? CacheQueryStringBehavior.denyList(...props.denyQueryParams) : CacheQueryStringBehavior.all()))),
|
|
457
|
+
headerBehavior: props.cacheKeyHeaders?.length ? CacheHeaderBehavior.allowList(...props.cacheKeyHeaders) : (props.allowHeaders?.length ? CacheHeaderBehavior.allowList(...props.allowHeaders) : CacheHeaderBehavior.none()),
|
|
458
|
+
cookieBehavior: props.cacheKeyCookies?.length ? CacheCookieBehavior.allowList(...props.cacheKeyCookies) : (props.allowCookies?.length ? CacheCookieBehavior.allowList(...props.allowCookies) : CacheCookieBehavior.none()),
|
|
421
459
|
enableAcceptEncodingBrotli: true,
|
|
422
460
|
enableAcceptEncodingGzip: true,
|
|
423
461
|
});
|
|
424
462
|
}
|
|
425
463
|
|
|
464
|
+
/**
|
|
465
|
+
* Creates an origin request policy for the Nuxt app route behavior of the CloudFront distribution.
|
|
466
|
+
*/
|
|
467
|
+
private createNuxtAppRequestPolicy(props: NuxtServerAppStackProps): OriginRequestPolicy {
|
|
468
|
+
return new OriginRequestPolicy(this, `${this.resourceIdPrefix}-request-policy`, {
|
|
469
|
+
originRequestPolicyName: `${this.resourceIdPrefix}-cdn-request-policy`,
|
|
470
|
+
comment: `Defines which request data to pass to the ${this.resourceIdPrefix} origin without affecting the cache key.`,
|
|
471
|
+
queryStringBehavior: props.forwardQueryParams?.length ? OriginRequestQueryStringBehavior.allowList(...props.forwardQueryParams) : OriginRequestQueryStringBehavior.all(),
|
|
472
|
+
headerBehavior: props.forwardHeaders?.length ? OriginRequestHeaderBehavior.allowList(...props.forwardHeaders) : OriginRequestHeaderBehavior.none(),
|
|
473
|
+
cookieBehavior: props.forwardCookies?.length ? OriginRequestCookieBehavior.allowList(...props.forwardCookies) : OriginRequestCookieBehavior.none(),
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
|
|
426
477
|
/**
|
|
427
478
|
* Creates a behavior for the CloudFront distribution to route matching Nuxt app API requests to the API gateway.
|
|
428
479
|
*/
|
|
@@ -433,6 +484,7 @@ export class NuxtServerAppStack extends Stack {
|
|
|
433
484
|
allowedMethods: AllowedMethods.ALLOW_ALL,
|
|
434
485
|
cachedMethods: CachedMethods.CACHE_GET_HEAD_OPTIONS,
|
|
435
486
|
cachePolicy: this.appCachePolicy,
|
|
487
|
+
originRequestPolicy: this.appRequestPolicy,
|
|
436
488
|
viewerProtocolPolicy: ViewerProtocolPolicy.HTTPS_ONLY
|
|
437
489
|
};
|
|
438
490
|
|
|
@@ -511,7 +563,7 @@ export class NuxtServerAppStack extends Stack {
|
|
|
511
563
|
*/
|
|
512
564
|
private configureDeployments(): BucketDeployment[] {
|
|
513
565
|
// Returns a deployment for every configured static asset type to respect the different cache settings
|
|
514
|
-
return this.staticAssetConfigs.filter(asset =>
|
|
566
|
+
return this.staticAssetConfigs.filter(asset => existsSync(asset.source)).map((asset, assetIndex) => {
|
|
515
567
|
return new BucketDeployment(this, `${this.resourceIdPrefix}-assets-deployment-${assetIndex}`, {
|
|
516
568
|
sources: [Source.asset(asset.source, {
|
|
517
569
|
exclude: asset.exclude,
|
|
@@ -616,7 +668,7 @@ export class NuxtServerAppStack extends Stack {
|
|
|
616
668
|
|
|
617
669
|
|
|
618
670
|
/**
|
|
619
|
-
* Creates a scheduled rule that runs every
|
|
671
|
+
* Creates a scheduled rule that runs every Tuesday at 03:30 AM GMT to trigger
|
|
620
672
|
* our cleanup Lambda function.
|
|
621
673
|
*
|
|
622
674
|
* @private
|
|
@@ -626,7 +678,7 @@ export class NuxtServerAppStack extends Stack {
|
|
|
626
678
|
ruleName: `${this.resourceIdPrefix}-scheduler`,
|
|
627
679
|
description: `Triggers a cleanup of the outdated static assets at the ${this.staticAssetsBucket.bucketName} S3 bucket.`,
|
|
628
680
|
enabled: true,
|
|
629
|
-
schedule: Schedule.cron({weekDay: '
|
|
681
|
+
schedule: Schedule.cron({weekDay: '2', hour: '3', minute: '30'}),
|
|
630
682
|
targets: [new LambdaFunction(this.cleanupLambdaFunction)],
|
|
631
683
|
});
|
|
632
684
|
}
|
|
@@ -50,11 +50,78 @@ export interface NuxtServerAppStackProps extends NuxtAppStackProps {
|
|
|
50
50
|
* Defaults to 30 days.
|
|
51
51
|
*/
|
|
52
52
|
readonly outdatedAssetsRetentionDays?: number;
|
|
53
|
+
/**
|
|
54
|
+
* An array of HTTP headers to forward to the Nuxt app on origin requests without affecting the cache key at CloudFront edge locations.
|
|
55
|
+
* This should only be used for headers that do not affect the response.
|
|
56
|
+
*
|
|
57
|
+
* No headers are forwarded by default.
|
|
58
|
+
*
|
|
59
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html}
|
|
60
|
+
*/
|
|
61
|
+
readonly forwardHeaders?: string[];
|
|
62
|
+
/**
|
|
63
|
+
* An array of HTTP headers to forward to the Nuxt app and to include in the cache key for objects that are cached at CloudFront edge locations.
|
|
64
|
+
* This should be used for headers that might affect the response, e.g., 'Authorization'.
|
|
65
|
+
*
|
|
66
|
+
* No headers are forwarded or included in the cache key by default.
|
|
67
|
+
*
|
|
68
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
69
|
+
*/
|
|
70
|
+
readonly cacheKeyHeaders?: string[];
|
|
71
|
+
/**
|
|
72
|
+
* An array of cookies to forward to the Nuxt app on origin requests without affecting the cache key at CloudFront edge locations.
|
|
73
|
+
* This should only be used for cookies that do not affect the response.
|
|
74
|
+
*
|
|
75
|
+
* No cookies are forwarded by default.
|
|
76
|
+
*
|
|
77
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html}
|
|
78
|
+
*/
|
|
79
|
+
readonly forwardCookies?: string[];
|
|
80
|
+
/**
|
|
81
|
+
* An array of cookies to forward to the Nuxt app and to include in the cache key for objects that are cached at CloudFront edge locations.
|
|
82
|
+
* This should be used for cookies that might affect the response, e.g., authentication cookies.
|
|
83
|
+
*
|
|
84
|
+
* No cookies are forwarded or included in the cache key by default.
|
|
85
|
+
*
|
|
86
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
87
|
+
*/
|
|
88
|
+
readonly cacheKeyCookies?: string[];
|
|
89
|
+
/**
|
|
90
|
+
* An array of query params to forward to the Nuxt app on origin requests without affecting the cache key at CloudFront edge locations.
|
|
91
|
+
* This should only be used for query params that do not affect the response and are required on SSR requests.
|
|
92
|
+
*
|
|
93
|
+
* All query params are forwarded by default.
|
|
94
|
+
*
|
|
95
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html}
|
|
96
|
+
*/
|
|
97
|
+
readonly forwardQueryParams?: string[];
|
|
98
|
+
/**
|
|
99
|
+
* An array of query params to forward to the Nuxt app and to include in the cache key for objects that are cached at CloudFront edge locations.
|
|
100
|
+
* This should be used for query params that affect the response and are required on SSR requests, e.g., filters.
|
|
101
|
+
*
|
|
102
|
+
* All query params are forwarded and included in the cache key by default.
|
|
103
|
+
*
|
|
104
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
105
|
+
*/
|
|
106
|
+
readonly cacheKeyQueryParams?: string[];
|
|
107
|
+
/**
|
|
108
|
+
* An array of query params to prevent forwarding to the Nuxt app and to not include in the cache key for objects that are cached at CloudFront edge locations.
|
|
109
|
+
* When set, all query params that are not specified in this array will be forwarded to the Nuxt app and included in the cache key.
|
|
110
|
+
* This should be used for query params that do not affect the response and are not required on SSR requests, e.g., 'fbclid' or 'utm_campaign'.
|
|
111
|
+
*
|
|
112
|
+
* If both {@see cacheKeyQueryParams} and {@see denyCacheKeyQueryParams} are specified, the {@see denyCacheKeyQueryParams} will be ignored.
|
|
113
|
+
* All query params are forwarded and included in the cache key by default.
|
|
114
|
+
*
|
|
115
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
116
|
+
*/
|
|
117
|
+
readonly denyCacheKeyQueryParams?: string[];
|
|
53
118
|
/**
|
|
54
119
|
* An array of headers to pass to the Nuxt app on SSR requests.
|
|
55
120
|
* The more headers are passed, the weaker the cache performance will be, as the cache key
|
|
56
121
|
* is based on the headers.
|
|
57
122
|
* No headers are passed by default.
|
|
123
|
+
*
|
|
124
|
+
* @deprecated Use {@see cacheKeyHeaders} instead.
|
|
58
125
|
*/
|
|
59
126
|
readonly allowHeaders?: string[];
|
|
60
127
|
/**
|
|
@@ -62,6 +129,8 @@ export interface NuxtServerAppStackProps extends NuxtAppStackProps {
|
|
|
62
129
|
* The more cookies are passed, the weaker the cache performance will be, as the cache key
|
|
63
130
|
* is based on the cookies.
|
|
64
131
|
* No cookies are passed by default.
|
|
132
|
+
*
|
|
133
|
+
* @deprecated Use {@see cacheKeyCookies} instead.
|
|
65
134
|
*/
|
|
66
135
|
readonly allowCookies?: string[];
|
|
67
136
|
/**
|
|
@@ -71,6 +140,8 @@ export interface NuxtServerAppStackProps extends NuxtAppStackProps {
|
|
|
71
140
|
* Note that this config can not be combined with {@see denyQueryParams}.
|
|
72
141
|
* If both are specified, the {@see denyQueryParams} will be ignored.
|
|
73
142
|
* All query params are passed by default.
|
|
143
|
+
*
|
|
144
|
+
* @deprecated Use {@see cacheKeyQueryParams} instead.
|
|
74
145
|
*/
|
|
75
146
|
readonly allowQueryParams?: string[];
|
|
76
147
|
/**
|
|
@@ -80,6 +151,8 @@ export interface NuxtServerAppStackProps extends NuxtAppStackProps {
|
|
|
80
151
|
* Note that this config can not be combined with {@see allowQueryParams}.
|
|
81
152
|
* If both are specified, the {@see denyQueryParams} will be ignored.
|
|
82
153
|
* All query params are passed by default.
|
|
154
|
+
*
|
|
155
|
+
* @deprecated Use {@see denyCacheKeyQueryParams} instead.
|
|
83
156
|
*/
|
|
84
157
|
readonly denyQueryParams?: string[];
|
|
85
158
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTnV4dFNlcnZlckFwcFN0YWNrUHJvcHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJOdXh0U2VydmVyQXBwU3RhY2tQcm9wcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHt0eXBlIE51eHRBcHBTdGFja1Byb3BzfSBmcm9tIFwiLi4vTnV4dEFwcFN0YWNrUHJvcHNcIjtcblxuLyoqXG4gKiBEZWZpbmVzIHRoZSBwcm9wcyByZXF1aXJlZCBmb3IgdGhlIHtAc2VlIE51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AgICAgKi9cbiAgICByZWFkb25seSBkZW55UXVlcnlQYXJhbXM/OiBzdHJpbmdbXTtcbn0iXX0=
|
|
@@ -62,11 +62,85 @@ export interface NuxtServerAppStackProps extends NuxtAppStackProps {
|
|
|
62
62
|
*/
|
|
63
63
|
readonly outdatedAssetsRetentionDays?: number;
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* An array of HTTP headers to forward to the Nuxt app on origin requests without affecting the cache key at CloudFront edge locations.
|
|
67
|
+
* This should only be used for headers that do not affect the response.
|
|
68
|
+
*
|
|
69
|
+
* No headers are forwarded by default.
|
|
70
|
+
*
|
|
71
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html}
|
|
72
|
+
*/
|
|
73
|
+
readonly forwardHeaders?: string[];
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* An array of HTTP headers to forward to the Nuxt app and to include in the cache key for objects that are cached at CloudFront edge locations.
|
|
77
|
+
* This should be used for headers that might affect the response, e.g., 'Authorization'.
|
|
78
|
+
*
|
|
79
|
+
* No headers are forwarded or included in the cache key by default.
|
|
80
|
+
*
|
|
81
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
82
|
+
*/
|
|
83
|
+
readonly cacheKeyHeaders?: string[];
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* An array of cookies to forward to the Nuxt app on origin requests without affecting the cache key at CloudFront edge locations.
|
|
87
|
+
* This should only be used for cookies that do not affect the response.
|
|
88
|
+
*
|
|
89
|
+
* No cookies are forwarded by default.
|
|
90
|
+
*
|
|
91
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html}
|
|
92
|
+
*/
|
|
93
|
+
readonly forwardCookies?: string[];
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* An array of cookies to forward to the Nuxt app and to include in the cache key for objects that are cached at CloudFront edge locations.
|
|
97
|
+
* This should be used for cookies that might affect the response, e.g., authentication cookies.
|
|
98
|
+
*
|
|
99
|
+
* No cookies are forwarded or included in the cache key by default.
|
|
100
|
+
*
|
|
101
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
102
|
+
*/
|
|
103
|
+
readonly cacheKeyCookies?: string[];
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* An array of query params to forward to the Nuxt app on origin requests without affecting the cache key at CloudFront edge locations.
|
|
107
|
+
* This should only be used for query params that do not affect the response and are required on SSR requests.
|
|
108
|
+
*
|
|
109
|
+
* All query params are forwarded by default.
|
|
110
|
+
*
|
|
111
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html}
|
|
112
|
+
*/
|
|
113
|
+
readonly forwardQueryParams?: string[];
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* An array of query params to forward to the Nuxt app and to include in the cache key for objects that are cached at CloudFront edge locations.
|
|
117
|
+
* This should be used for query params that affect the response and are required on SSR requests, e.g., filters.
|
|
118
|
+
*
|
|
119
|
+
* All query params are forwarded and included in the cache key by default.
|
|
120
|
+
*
|
|
121
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
122
|
+
*/
|
|
123
|
+
readonly cacheKeyQueryParams?: string[];
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* An array of query params to prevent forwarding to the Nuxt app and to not include in the cache key for objects that are cached at CloudFront edge locations.
|
|
127
|
+
* When set, all query params that are not specified in this array will be forwarded to the Nuxt app and included in the cache key.
|
|
128
|
+
* This should be used for query params that do not affect the response and are not required on SSR requests, e.g., 'fbclid' or 'utm_campaign'.
|
|
129
|
+
*
|
|
130
|
+
* If both {@see cacheKeyQueryParams} and {@see denyCacheKeyQueryParams} are specified, the {@see denyCacheKeyQueryParams} will be ignored.
|
|
131
|
+
* All query params are forwarded and included in the cache key by default.
|
|
132
|
+
*
|
|
133
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
134
|
+
*/
|
|
135
|
+
readonly denyCacheKeyQueryParams?: string[];
|
|
136
|
+
|
|
65
137
|
/**
|
|
66
138
|
* An array of headers to pass to the Nuxt app on SSR requests.
|
|
67
139
|
* The more headers are passed, the weaker the cache performance will be, as the cache key
|
|
68
140
|
* is based on the headers.
|
|
69
141
|
* No headers are passed by default.
|
|
142
|
+
*
|
|
143
|
+
* @deprecated Use {@see cacheKeyHeaders} instead.
|
|
70
144
|
*/
|
|
71
145
|
readonly allowHeaders?: string[];
|
|
72
146
|
|
|
@@ -75,6 +149,8 @@ export interface NuxtServerAppStackProps extends NuxtAppStackProps {
|
|
|
75
149
|
* The more cookies are passed, the weaker the cache performance will be, as the cache key
|
|
76
150
|
* is based on the cookies.
|
|
77
151
|
* No cookies are passed by default.
|
|
152
|
+
*
|
|
153
|
+
* @deprecated Use {@see cacheKeyCookies} instead.
|
|
78
154
|
*/
|
|
79
155
|
readonly allowCookies?: string[];
|
|
80
156
|
|
|
@@ -85,6 +161,8 @@ export interface NuxtServerAppStackProps extends NuxtAppStackProps {
|
|
|
85
161
|
* Note that this config can not be combined with {@see denyQueryParams}.
|
|
86
162
|
* If both are specified, the {@see denyQueryParams} will be ignored.
|
|
87
163
|
* All query params are passed by default.
|
|
164
|
+
*
|
|
165
|
+
* @deprecated Use {@see cacheKeyQueryParams} instead.
|
|
88
166
|
*/
|
|
89
167
|
readonly allowQueryParams?: string[];
|
|
90
168
|
|
|
@@ -95,6 +173,8 @@ export interface NuxtServerAppStackProps extends NuxtAppStackProps {
|
|
|
95
173
|
* Note that this config can not be combined with {@see allowQueryParams}.
|
|
96
174
|
* If both are specified, the {@see denyQueryParams} will be ignored.
|
|
97
175
|
* All query params are passed by default.
|
|
176
|
+
*
|
|
177
|
+
* @deprecated Use {@see denyCacheKeyQueryParams} instead.
|
|
98
178
|
*/
|
|
99
179
|
readonly denyQueryParams?: string[];
|
|
100
180
|
}
|
|
@@ -104,40 +104,76 @@ const appStackProps: NuxtServerAppStackProps = {
|
|
|
104
104
|
outdatedAssetsRetentionDays: 30,
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
|
-
* An array of headers to
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* No headers are
|
|
107
|
+
* An array of HTTP headers to forward to the Nuxt app on origin requests without affecting the cache key at CloudFront edge locations.
|
|
108
|
+
* This should only be used for headers that do not affect the response.
|
|
109
|
+
*
|
|
110
|
+
* No headers are forwarded by default.
|
|
111
|
+
*
|
|
112
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html}
|
|
111
113
|
*/
|
|
112
|
-
|
|
114
|
+
forwardHeaders: [],
|
|
113
115
|
|
|
114
116
|
/**
|
|
115
|
-
* An array of
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* No
|
|
117
|
+
* An array of HTTP headers to forward to the Nuxt app and to include in the cache key for objects that are cached at CloudFront edge locations.
|
|
118
|
+
* This should be used for headers that might affect the response, e.g., 'Authorization'.
|
|
119
|
+
*
|
|
120
|
+
* No headers are forwarded or included in the cache key by default.
|
|
121
|
+
*
|
|
122
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
119
123
|
*/
|
|
120
|
-
|
|
124
|
+
cacheKeyHeaders: [],
|
|
121
125
|
|
|
122
126
|
/**
|
|
123
|
-
* An array of
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
127
|
+
* An array of cookies to forward to the Nuxt app on origin requests without affecting the cache key at CloudFront edge locations.
|
|
128
|
+
* This should only be used for cookies that do not affect the response.
|
|
129
|
+
*
|
|
130
|
+
* No cookies are forwarded by default.
|
|
131
|
+
*
|
|
132
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html}
|
|
129
133
|
*/
|
|
130
|
-
|
|
134
|
+
forwardCookies: [],
|
|
131
135
|
|
|
132
136
|
/**
|
|
133
|
-
* An array of
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
137
|
+
* An array of cookies to forward to the Nuxt app and to include in the cache key for objects that are cached at CloudFront edge locations.
|
|
138
|
+
* This should be used for cookies that might affect the response, e.g., authentication cookies.
|
|
139
|
+
*
|
|
140
|
+
* No cookies are forwarded or included in the cache key by default.
|
|
141
|
+
*
|
|
142
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
139
143
|
*/
|
|
140
|
-
|
|
144
|
+
cacheKeyCookies: [],
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* An array of query params to forward to the Nuxt app on origin requests without affecting the cache key at CloudFront edge locations.
|
|
148
|
+
* This should only be used for query params that do not affect the response and are required on SSR requests.
|
|
149
|
+
*
|
|
150
|
+
* All query params are forwarded by default.
|
|
151
|
+
*
|
|
152
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html}
|
|
153
|
+
*/
|
|
154
|
+
forwardQueryParams: [],
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* An array of query params to forward to the Nuxt app and to include in the cache key for objects that are cached at CloudFront edge locations.
|
|
158
|
+
* This should be used for query params that affect the response and are required on SSR requests, e.g., filters.
|
|
159
|
+
*
|
|
160
|
+
* All query params are forwarded and included in the cache key by default.
|
|
161
|
+
*
|
|
162
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
163
|
+
*/
|
|
164
|
+
cacheKeyQueryParams: [],
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* An array of query params to prevent forwarding to the Nuxt app and to not include in the cache key for objects that are cached at CloudFront edge locations.
|
|
168
|
+
* When set, all query params that are not specified in this array will be forwarded to the Nuxt app and included in the cache key.
|
|
169
|
+
* This should be used for query params that do not affect the response and are not required on SSR requests, e.g., 'fbclid' or 'utm_campaign'.
|
|
170
|
+
*
|
|
171
|
+
* If both {@see cacheKeyQueryParams} and {@see denyCacheKeyQueryParams} are specified, the {@see denyCacheKeyQueryParams} will be ignored.
|
|
172
|
+
* All query params are forwarded and included in the cache key by default.
|
|
173
|
+
*
|
|
174
|
+
* {@link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html}
|
|
175
|
+
*/
|
|
176
|
+
denyCacheKeyQueryParams: [],
|
|
141
177
|
|
|
142
178
|
/**
|
|
143
179
|
* Stack tags that will be applied to all the taggable resources and the stack itself.
|