1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 00:50:20 +02:00

added Logger middleware

This commit is contained in:
Nikolay Kim
2019-03-06 19:19:27 -08:00
parent 561a89b8b3
commit 244fff9e0a
9 changed files with 279 additions and 150 deletions

View File

@@ -10,7 +10,7 @@ use actix_service::{
use futures::future::{ok, Either, Future, FutureResult};
use futures::{Async, Poll};
use crate::dev::{insert_slash, AppConfig, HttpServiceFactory};
use crate::dev::{AppConfig, HttpServiceFactory};
use crate::guard::Guard;
use crate::resource::Resource;
use crate::route::Route;
@@ -263,9 +263,9 @@ where
Some(self.guards)
};
let rdef = if config.is_root() {
ResourceDef::prefix(&insert_slash(&self.rdef))
ResourceDef::root_prefix(&self.rdef)
} else {
ResourceDef::prefix(&insert_slash(&self.rdef))
ResourceDef::prefix(&self.rdef)
};
config.register_service(rdef, guards, self.endpoint)
}