Skip to content

Dynamic ODB routes take precedence over specific SSR routes #1077

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

Closed
ascorbic opened this issue Dec 23, 2021 · 0 comments · Fixed by #1105
Closed

Dynamic ODB routes take precedence over specific SSR routes #1077

ascorbic opened this issue Dec 23, 2021 · 0 comments · Fixed by #1105

Comments

@ascorbic
Copy link
Contributor

If a dynamic route exists that uses fallback=blocking or ISR, and so needs an ODB, we generate a rewrite pointing at the ODB handler. However we don't do the same for SSR routes, and instead rely on falling-through to a root-level rewrite pointing at the regular handler. This means that if a specific SSR route also matches a dynamic ODB route then it doesn't fall through, meaning that it is served by the wrong handler. This causes issues such as #1068 but possibly more subtle ones that aren't as immediately obvious as a missing query param.

The fix is to generate rewrites for every route, which we had hoped to avoid as it can mean a lot of rules. Alternatively, work out a way to normalise and combine rules that match the same requests.

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 a pull request may close this issue.

1 participant