From c8d5f0b86cb3eb1677d51a4531e8bcc948f8ea4b Mon Sep 17 00:00:00 2001 From: Thijs Daniels Date: Mon, 15 Jul 2024 12:18:36 +0200 Subject: [PATCH] feat(cdk-docker-cluster): allow all http methods --- .changeset/pretty-boats-raise.md | 5 +++++ packages/cdk-docker-cluster/src/constructs/DockerCluster.ts | 2 ++ packages/cdk-next-app/src/constructs/NextApp.ts | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 .changeset/pretty-boats-raise.md diff --git a/.changeset/pretty-boats-raise.md b/.changeset/pretty-boats-raise.md new file mode 100644 index 00000000..05410586 --- /dev/null +++ b/.changeset/pretty-boats-raise.md @@ -0,0 +1,5 @@ +--- +"@codedazur/cdk-docker-cluster": minor +--- + +All HTTP methods are now allowed by default. diff --git a/packages/cdk-docker-cluster/src/constructs/DockerCluster.ts b/packages/cdk-docker-cluster/src/constructs/DockerCluster.ts index 164b8a15..5aad5b98 100644 --- a/packages/cdk-docker-cluster/src/constructs/DockerCluster.ts +++ b/packages/cdk-docker-cluster/src/constructs/DockerCluster.ts @@ -4,6 +4,7 @@ import { } from "@codedazur/cdk-site-distribution"; import { App } from "aws-cdk-lib"; import { + AllowedMethods, CachePolicy, OriginProtocolPolicy, OriginRequestPolicy, @@ -156,6 +157,7 @@ export class DockerCluster extends Construct { origin: new LoadBalancerV2Origin(this.service.loadBalancer, { protocolPolicy: OriginProtocolPolicy.HTTP_ONLY, }), + allowedMethods: AllowedMethods.ALLOW_ALL, cachePolicy, originRequestPolicy, }); diff --git a/packages/cdk-next-app/src/constructs/NextApp.ts b/packages/cdk-next-app/src/constructs/NextApp.ts index fde26d0d..ed3f4efb 100644 --- a/packages/cdk-next-app/src/constructs/NextApp.ts +++ b/packages/cdk-next-app/src/constructs/NextApp.ts @@ -14,6 +14,9 @@ export interface NextAppProps extends DockerClusterProps {} /** * A docker cluster preconfigured for running a Next.js application with support * for private NPM packages using a build-time secret. + * + * @todo Add specific distribution behaviors for the various Next.js features. + * @see https://bitbucket.org/codedazur/cdk-constructs/src/v5.14.0/src/NextSite/NextSite.ts */ export class NextApp extends DockerCluster { constructor(