anmolnar commented on code in PR #2362:
URL: https://github.com/apache/zookeeper/pull/2362#discussion_r3088164917
##########
zookeeper-metrics-providers/zookeeper-prometheus-metrics/src/main/java/org/apache/zookeeper/metrics/prometheus/PrometheusMetricsProvider.java:
##########
@@ -171,23 +181,47 @@ public void start() throws
MetricsProviderLifeCycleException {
int acceptors = 1;
int selectors = 1;
- // Configure HTTP connector if enabled
- if (this.httpPort != -1) {
- ServerConnector httpConnector = new ServerConnector(server,
acceptors, selectors);
- httpConnector.setPort(this.httpPort);
- httpConnector.setHost(this.host);
- server.addConnector(httpConnector);
- }
+ ServerConnector connector = null;
+
+ if (this.httpPort != -1 && this.httpsPort != -1 && this.httpPort
== this.httpsPort) {
+ SecureRequestCustomizer customizer = new
SecureRequestCustomizer();
+ customizer.setStsMaxAge(DEFAULT_STS_MAX_AGE);
+ customizer.setStsIncludeSubDomains(true);
Review Comment:
Thanks for the explanation. I think it'd be beneficial to briefly mention
these in a Javadoc.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]