Skip to content

Path prefix matching for routes #170

@mjg123

Description

@mjg123

It'd be great to be able to treat a route as a prefix when matching, rather than having to match exactly. For example:

  /r/my_app/some-path-prefix/<anything>/<at>/<all>  ->  myfn

This doesn't mandate that path params to be evaluated by the fn platform, as long as the entire request URL is passed into the function we can do that ourselves.

This request would be especially useful for https://github.com/bbilger/jrestlesss - we can define an application with a base-url and many sub-resources hosted in a single function. This is hard work at the moment as we need to create a lot of routes in the fn platform, and are not able to dynamically add a route at runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions