We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d18a58 commit fdfa5afCopy full SHA for fdfa5af
.changeset/wet-peaches-speak.md
@@ -0,0 +1,5 @@
1
+---
2
+"@opennextjs/cloudflare": patch
3
4
+
5
+fix skew protection handling of POST requests
packages/cloudflare/src/cli/templates/skew-protection.ts
@@ -62,7 +62,11 @@ export function maybeGetSkewProtectionResponse(request: Request): Promise<Respon
62
url.hostname = hostname;
63
const requestToOlderDeployment = new Request(url!, request);
64
65
- return fetch(requestToOlderDeployment);
+ // Remove the origin header to prevent an error with POST requests
66
+ const headers = new Headers(request.headers);
67
+ headers.delete("origin");
68
69
+ return fetch(requestToOlderDeployment, { headers });
70
}
71
72
0 commit comments