这是indexloc提供的服务,不要输入任何密码
Skip to content

Add "Catch all" workers #199

@Angelmmiguel

Description

@Angelmmiguel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions