Skip to content

Getting the "matched" route without actual routing? #17

@BabakMN

Description

@BabakMN

Is it possible to match for a route or get the matched route before doing the actual routing?

The use case would be for things like authentication middleware.

So you could have a top middleware determining which route is going to be routed to, then you have one below which could allow/deny. Then you actually route.

This way individual routes wouldn't have to worry about authentication (like forgetting to protect them with a middleware at the time of creation).

Without "match without routing" you'd have to string match the URL manually.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions