Commit ccf8f86c by Rico Pahlisch Committed by GitHub

use only default https ports for https check

spring boot uses all high ports and there are some trouble if ports end with 443 (e.g. 24443, ...)
parent 7425f974
......@@ -16,7 +16,9 @@
package org.springframework.cloud.netflix.ribbon;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import com.netflix.loadbalancer.Server;
......@@ -25,10 +27,11 @@ import com.netflix.loadbalancer.Server;
* @author Spencer Gibb
*/
public class DefaultServerIntrospector implements ServerIntrospector {
private static final List<Integer> SECURE_PORTS = Arrays.asList(443, 8443);
@Override
public boolean isSecure(Server server) {
// Can we do better?
return (""+server.getPort()).endsWith("443");
return SECURE_PORTS.contains(server.getPort());
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment