-
Notifications
You must be signed in to change notification settings - Fork 37
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
Wildcard matching in the middle of the path #39
Comments
Hello, #[must_use]
pub fn imgsrv_scope<T: ServeSlide + 'static>() -> Scope {
web::scope("/imgsrv")
.route("{path:.+}/size", web::get().to(slide_size::<T>))
.route("{path:.+}/roi", web::get().to(roi::<T>))
.route("{path:.+}/slide", web::get().to(slide_info::<T>))
.route("{path:.+}/tile", web::get().to(tile::<T>))
.route("{path:.+}/thumbnail", web::get().to(thumbnail::<T>))
.route("{path:.+}/is_compatible", web::get().to(is_compatible::<T>))
} Thank you :) |
This should be easier to implement after the 0.8 syntax change and I think can be done without hurting performance in existing patterns. |
Now that 0.8 is released, I'll try to implement this along with #17. The implementation should be very similar. |
As discussed in Tokio's Discord server, it would be useful to add support for wildcard matching in the middle of the path
For instance, this is required to implement Docker Registry API V2
Some examples are provided below:
/v2/<name>/
/v2/<name>/blobs/<digest>
/v2/<name>/manifests/<reference>
Note: <name> can contain any number of segments (at least 2), but is limited to 256 characters in length (including slashes)
Also, it can be useful for various git clients (something like
/:repo/*filepath/action
)The text was updated successfully, but these errors were encountered: