在Akka http的配置文件中,添加如下代码:
akka.ssl-config = {
trustManager = {
stores = [
{type = "JKS", path = "truststore.jks", password = "password"}
]
// 设置为true即可信任所有证书
accept-any-cert = true
}
}
其中,accept-any-cert
设置为true即可信任所有证书。如果需要使用指定的证书,可以在stores
里添加对应的证书信息。