Skip to content

Commit 714172d

Browse files
authored
fix: trailing slash redirect (#329)
fixes #312
1 parent 0892679 commit 714172d

File tree

4 files changed

+47
-33
lines changed

4 files changed

+47
-33
lines changed

.changeset/nice-penguins-boil.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
fix: trailing slash redirect

examples/e2e/app-router/e2e/trailing.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { expect, test } from "@playwright/test";
22

3-
// trailingSlash redirecting doesn't work: https://github.com/opennextjs/opennextjs-cloudflare/issues/312
4-
test.skip("trailingSlash redirect", async ({ page }) => {
3+
test("trailingSlash redirect", async ({ page }) => {
54
const response = await page.goto("/ssr/");
65

76
expect(response?.request().redirectedFrom()?.url()).toMatch(/\/ssr\/$/);
87
expect(response?.request().url()).toMatch(/\/ssr$/);
98
});
109

11-
// trailingSlash redirecting doesn't work: https://github.com/opennextjs/opennextjs-cloudflare/issues/312
12-
test.skip("trailingSlash redirect with search parameters", async ({ page }) => {
10+
test("trailingSlash redirect with search parameters", async ({ page }) => {
1311
const response = await page.goto("/ssr/?happy=true");
1412

1513
expect(response?.request().redirectedFrom()?.url()).toMatch(/\/ssr\/\?happy=true$/);

packages/cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"dependencies": {
7474
"@ast-grep/napi": "^0.34.1",
7575
"@dotenvx/dotenvx": "catalog:",
76-
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@718",
76+
"@opennextjs/aws": "https://pkg.pr.new/@opennextjs/aws@722",
7777
"enquirer": "^2.4.1",
7878
"glob": "catalog:",
7979
"ts-morph": "catalog:",

0 commit comments

Comments
 (0)