Skip to content

Conversation

sommeeeer
Copy link
Contributor

@sommeeeer sommeeeer commented Oct 10, 2025

For opennextjs/opennextjs-cloudflare#942

As the filter currently was it only excluded static API routes that was excatly "/api" and if that route was present in dynamicRoutePages. We want to filter out every dynamic route.

It caused an invalid regex runtime error if you had a route on app/api/auth/[...better-auth]/route.ts cause it wouldn't be excluded like it should, resulting in creating a RouteDefinition with an invalid regex due to unescaped hyphens.

Copy link

changeset-bot bot commented Oct 10, 2025

🦋 Changeset detected

Latest commit: d8d4aba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@opennextjs/aws Patch
app-pages-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 Oct 10, 2025

Open in StackBlitz

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

commit: d8d4aba

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.

Looks good, can you add an e2e test?

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.

Awesome, thanks @sommeeeer

you/are/really/cool ;)

@vicb vicb merged commit 8dd43ee into opennextjs:main Oct 10, 2025
3 checks passed
@github-actions github-actions bot mentioned this pull request Oct 10, 2025
@sommeeeer sommeeeer deleted the fix-catch-all-invalid-regex branch October 10, 2025 14:36
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