Skip to content

Commit

Permalink
feat(cdk-docker-cluster): allow all http methods
Browse files Browse the repository at this point in the history
  • Loading branch information
thijsdaniels committed Jul 15, 2024
1 parent 7d709c8 commit c8d5f0b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/pretty-boats-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@codedazur/cdk-docker-cluster": minor
---

All HTTP methods are now allowed by default.
2 changes: 2 additions & 0 deletions packages/cdk-docker-cluster/src/constructs/DockerCluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
} from "@codedazur/cdk-site-distribution";
import { App } from "aws-cdk-lib";
import {
AllowedMethods,
CachePolicy,
OriginProtocolPolicy,
OriginRequestPolicy,
Expand Down Expand Up @@ -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,
});
Expand Down
3 changes: 3 additions & 0 deletions packages/cdk-next-app/src/constructs/NextApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c8d5f0b

Please sign in to comment.