Skip to content

fix(edge): resolve static assets with encoded square brackets - #456

Merged
Brooooooklyn merged 1 commit into
mainfrom
fix/encoded-static-asset-brackets
Oct 17, 2026
Merged

Brooooooklyn merged 1 commit into
mainfrom
fix/encoded-static-asset-brackets

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 16, 2026

Copy link
Copy Markdown
Member

Next.js static exports can request chunk filenames with %5B and %5D. The asset lookup rejects these encodings, so the request returns HTML fallback content or 404.

Allow encoded square brackets when resolving static assets. Literal and encoded bracket URLs now resolve to the same file unless the manifest contains an exact raw match. Keep the existing guards for encoded separators, ordinary path text, dot segments, and malformed escapes.

Reproduction: encoded Next.js static asset paths.

@fengmk2
fengmk2 requested a review from Brooooooklyn October 16, 2026 17:02
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-encoded-static-asset-brackets-void-cloud.voidzero-docs.workers.dev (commit 4174168)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://efa8ece7-void-cloud.voidzero-docs.workers.dev 4174168 2026-10-17T03:17:24.995Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://8277c634-void-cloud.voidzero-docs.workers.dev 68fa52a 2026-10-16T17:04:07.564Z Visit the dashboard ↗

Brooooooklyn commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Merge activity

  • Oct 17, 3:15 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 17, 3:16 AM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 17, 3:19 AM UTC: @Brooooooklyn merged this pull request with Graphite.

@Brooooooklyn
Brooooooklyn force-pushed the fix/encoded-static-asset-brackets branch from 68fa52a to 4174168 Compare October 17, 2026 03:16
@Brooooooklyn
Brooooooklyn merged commit 96c0091 into main Oct 17, 2026
19 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/encoded-static-asset-brackets branch October 17, 2026 03:19
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