Skip to content

axum 0.8 and wildcard * #3203

@frederikhors

Description

@frederikhors

With axum before 0.8 I was using this:

Router::new().route(
    &format!("{}/*value", conf.API_PREFIX),
    get(something),
);

Now it says me:

Path segments must not start with `*`.
For wildcard capture, use `{*wildcard}`.
If you meant to literally match a segment starting with an asterisk, call `without_v07_checks` on the router.

What does it mean?

Where should I write {*wildcard}?

I opened an issue because I think we should update docs and errors.

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