summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java
index d84884665ef..7b91b4b3244 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/JettyHttpServer.java
@@ -1,6 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.container.http;
+import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.component.ComponentId;
import com.yahoo.component.ComponentSpecification;
import com.yahoo.container.bundle.BundleInstantiationSpecification;
@@ -25,13 +26,16 @@ public class JettyHttpServer extends SimpleComponent implements ServerConfig.Pro
private final List<ConnectorFactory> connectorFactories = new ArrayList<>();
private final List<String> ignoredUserAgentsList = new ArrayList<>();
- public JettyHttpServer(String componentId, ContainerCluster<?> cluster, boolean isHostedVespa) {
+ public JettyHttpServer(String componentId, ContainerCluster<?> cluster, DeployState deployState) {
super(new ComponentModel(componentId, com.yahoo.jdisc.http.server.jetty.JettyHttpServer.class.getName(), null));
- this.isHostedVespa = isHostedVespa;
+ this.isHostedVespa = deployState.isHosted();
this.cluster = cluster;
final FilterBindingsProviderComponent filterBindingsProviderComponent = new FilterBindingsProviderComponent(componentId);
addChild(filterBindingsProviderComponent);
inject(filterBindingsProviderComponent);
+ for (String agent : deployState.featureFlags().ignoredHttpUserAgents()) {
+ addIgnoredUserAgent(agent);
+ }
}
public void setHostedVespa(boolean isHostedVespa) { this.isHostedVespa = isHostedVespa; }