1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

add external resource support on scope level

This commit is contained in:
Nikolay Kim
2019-06-03 23:41:32 +06:00
parent 1fce4876f3
commit 0e138e111f
4 changed files with 105 additions and 75 deletions

View File

@@ -122,7 +122,9 @@ impl ResourceMap {
I: AsRef<str>,
{
if let Some(pattern) = self.named.get(name) {
self.fill_root(path, elements)?;
if pattern.pattern().starts_with("/") {
self.fill_root(path, elements)?;
}
if pattern.resource_path(path, elements) {
Ok(Some(()))
} else {