10000 Fix decode path params in cache interceptor by conico974 · Pull Request #868 · opennextjs/opennextjs-aws · GitHub
[go: up one dir, main page]

Skip to content

Fix decode path params in cache interceptor #868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2025

Conversation

conico974
Copy link
Contributor

The SSG cache key used by the incremental cache needs to be decoded.
Otherwise the cache interceptor won't be able to find the cache, and will fallback to NextServer

Copy link
changeset-bot bot commented May 19, 2025

🦋 Changeset detected

Latest commit: e89a0d1

The changes in this PR wi 8000 ll be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch
app-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
pkg-pr-new bot commented May 19, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/@opennextjs/aws@868

commit: e89a0d1

@conico974 conico974 requested review from vicb and khuezy May 19, 2025 13:11
@conico974 conico974 force-pushed the fix/cache-interception-encoding branch from 13dcdc3 to 2c612b7 Compare May 19, 2025 13:26
.split("/")
.map((segment) => {
try {
// https://github.com/vercel/next.js/blob/34039551d2e5f611c0abde31a197d9985918adaf/packages/next/src/shared/lib/router/utils/escape-path-delimiters.ts#L2-L10 8000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: what about copy the original escapePathDelimiters from next and call from here.

It would be easier to check that the code is in sync / update when needed.

Copy link
Contributor
@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one nit.

@conico974 conico974 merged commit 1bebc1a into opennextjs:main May 19, 2025
3 checks passed
@github-actions github-actions bot mentioned this pull request May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0