1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

Cut down a lot on compilation time

This commit is contained in:
Quentin Gliech
2021-12-17 19:55:22 +01:00
parent 2f97ca685d
commit a55e8af2c8
17 changed files with 173 additions and 156 deletions

View File

@@ -40,16 +40,25 @@ pub fn root(
templates: &Templates,
config: &RootConfig,
) -> BoxedFilter<(impl Reply,)> {
health(pool)
.or(oauth2(pool, templates, &config.oauth2, &config.cookies))
.or(views(
pool,
templates,
&config.oauth2,
&config.csrf,
&config.cookies,
))
.or(static_files(config.http.web_root.clone()))
.with(warp::log(module_path!()))
let health = health(pool);
let oauth2 = oauth2(pool, templates, &config.oauth2, &config.cookies);
let views = views(
pool,
templates,
&config.oauth2,
&config.csrf,
&config.cookies,
);
let static_files = static_files(config.http.web_root.clone());
let filter = health
.or(views)
.unify()
.or(static_files)
.unify()
.boxed()
.or(oauth2)
.boxed();
filter.with(warp::log(module_path!())).boxed()
}