use of com.yahoo.vespa.model.container.http.FilterChains in project vespa by vespa-engine.
the class HttpBuilder method doBuild.
@Override
protected Http doBuild(AbstractConfigProducer ancestor, Element spec) {
FilterChains filterChains;
List<Binding> bindings = new ArrayList<>();
AccessControl accessControl = null;
Element filteringElem = XML.getChild(spec, "filtering");
if (filteringElem != null) {
filterChains = new FilterChainsBuilder().build(ancestor, filteringElem);
bindings = readFilterBindings(filteringElem);
Element accessControlElem = XML.getChild(filteringElem, "access-control");
if (accessControlElem != null) {
accessControl = buildAccessControl(ancestor, accessControlElem);
bindings.addAll(accessControl.getBindings());
filterChains.add(new Chain<>(FilterChains.emptyChainSpec(ACCESS_CONTROL_CHAIN_ID)));
}
} else {
filterChains = new FilterChainsBuilder().newChainsInstance(ancestor);
}
Http http = new Http(bindings, accessControl);
http.setFilterChains(filterChains);
buildHttpServers(ancestor, http, spec);
return http;
}
Aggregations