spring-cloud-gateway
spring-cloud-gateway copied to clipboard
Property use-insecure-trust-manager not working on spring cloud gateway MVC
The bug
Adding the property spring.cloud.gateway.httpclient.ssl.use-insecure-trust-manager
and set the value to true
still generates the error:
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Sample routes.yaml
spring: cloud: gateway: httpclient: ssl: use-insecure-trust-manager: true mvc: routes: - id: certificate uri: https://untrusted-root.badssl.com predicates: - Path= /http/** filters: - RewritePath= /http/?(?<segment>/.*), /$\{segment}
application.properties
` spring.application.name=demo spring.config.import=./routes.yaml spring.cloud.gateway.httpclient.ssl.use-insecure-trust-manager=true
`