use of com.google.gerrit.pgm.http.jetty.ProjectQoSFilter.ProjectQoSFilterModule in project gerrit by GerritCodeReview.
the class Daemon method createWebInjector.
private Injector createWebInjector() {
final List<Module> modules = new ArrayList<>();
modules.add(RequestContextFilter.module());
modules.add(RequestMetricsFilter.module());
modules.add(H2CacheBasedWebSession.module());
modules.add(sysInjector.getInstance(GerritAuthModule.class));
modules.add(sysInjector.getInstance(GitOverHttpModule.class));
modules.add(sysInjector.getInstance(HttpdModule.class));
if (sshd) {
modules.add(new ProjectQoSFilterModule());
}
modules.add(RequestCleanupFilter.module());
modules.add(AllRequestFilter.module());
modules.add(SetThreadNameFilter.module());
modules.add(sysInjector.getInstance(WebModule.class));
modules.add(sysInjector.getInstance(RequireSslFilterModule.class));
modules.add(new HttpPluginModule());
if (sshd) {
modules.add(sshInjector.getInstance(WebSshGlueModule.class));
} else {
modules.add(new NoSshModule());
}
AuthConfig authConfig = cfgInjector.getInstance(AuthConfig.class);
if (authConfig.getAuthType() == AuthType.OPENID || authConfig.getAuthType() == AuthType.OPENID_SSO) {
modules.add(new OpenIdModule());
} else if (authConfig.getAuthType() == AuthType.OAUTH) {
modules.add(new OAuthModule());
}
modules.add(sysInjector.getInstance(GetUserFilterModule.class));
// StaticModule contains a "/*" wildcard, place it last.
GerritOptions opts = sysInjector.getInstance(GerritOptions.class);
if (opts.enableMasterFeatures()) {
modules.add(sysInjector.getInstance(StaticModule.class));
}
return sysInjector.createChildInjector(modules);
}
Aggregations