-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable Invalidation Path #245
Comments
For some reason, the code is explicitly just doing those two, so if that was just removed, then the default of the underlying BucketDeployment.distributionPaths is this:
|
It seems like a simple fix is to add diff --git a/lib/spa-deploy/spa-deploy-construct.ts b/lib/spa-deploy/spa-deploy-construct.ts
index d754f8d..f53e0f4 100644
--- a/lib/spa-deploy/spa-deploy-construct.ts
+++ b/lib/spa-deploy/spa-deploy-construct.ts
@@ -23,6 +23,7 @@ export interface SPADeployConfig {
readonly certificateARN?: string,
readonly cfBehaviors?: Behavior[],
readonly cfAliases?: string[],
+ readonly distributionPaths?: string[],
readonly exportWebsiteUrlOutput?:boolean,
readonly exportWebsiteUrlName?: string,
readonly blockPublicAccess?:s3.BlockPublicAccess
@@ -235,7 +236,7 @@ export class SPADeploy extends Construct {
destinationBucket: websiteBucket,
// Invalidate the cache for / and index.html when we deploy so that cloudfront serves latest site
distribution,
- distributionPaths: ['/', `/${config.indexDoc}`],
+ distributionPaths: config.distributionPaths || ['/', `/${config.indexDoc}`],
role: config.role,
}); |
…dZoneConfig` previous commit added the feature to `SPADeployConfig`, so this one is also adding it to `HostedZoneConfig`
When using
createSiteWithCloudfront
is there a way to configure the Cloudfront invalidation path that should be performed on deploy?Cause currently, by default, only the configured indexDoc and / are invalidated.
The text was updated successfully, but these errors were encountered: