Skip to content

Commit 714172d

Browse files
authoredFeb 3, 2025··
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
 

Diff for: ‎.changeset/nice-penguins-boil.md

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

Diff for: ‎examples/e2e/app-router/e2e/trailing.test.ts

+2-4
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$/);

Diff for: ‎packages/cloudflare/package.json

+1-1
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:",

Diff for: ‎pnpm-lock.yaml

+39-28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.