Skip to content
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

Add "Catch all" workers #199

Closed
Angelmmiguel opened this issue Aug 21, 2023 · 1 comment · Fixed by #197
Closed

Add "Catch all" workers #199

Angelmmiguel opened this issue Aug 21, 2023 · 1 comment · Fixed by #197
Labels
🚀 enhancement New feature or request
Milestone

Comments

@Angelmmiguel
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Sometimes, you need to define workers that will reply to "any other route". These workers provide a response when no other can reply to that route. This is useful for SPAs that are rendered on server side among other use cases.

Describe the solution you'd like

Following the filesystem-based routing, these files are defined as [...ID].ext (See NextJS). They are similar to dynamic parameters, but in this case they include a ... right before the parameter name. The given filename example should capture all these routes:

/a
/test
/a/b
/a/b/c

However, these routes have the lowest possible priority. Any other kind of route (including dynamic params) have a higher priority. When two "catch all" workers can reply to the same request, the one with a higher depth (./sub/[...all].wasm vs ./[...all].wasm) will reply it.

Describe alternatives you've considered

No response

Additional context

No response

@Angelmmiguel Angelmmiguel added the 🚀 enhancement New feature or request label Aug 21, 2023
@Angelmmiguel Angelmmiguel added this to the v1.5.0 milestone Aug 21, 2023
@Angelmmiguel
Copy link
Contributor Author

Angelmmiguel commented Aug 21, 2023

@mtt-artis I assigned the task to you for tracking purposes. Thank you for your contribution!

EDIT: Well, I tried but GitHub is not showing your username in the modal yet :/

@Angelmmiguel Angelmmiguel modified the milestones: v1.5.0, v1.6.0 Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant