Unable to communicate securely with peer

342 阅读1分钟

执行的请求

# 使用https
curl --location 'https://ip:端口/api'

错误信息

curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.

在这里插入图片描述

解决方法

# 使用 -k
curl -k --location 'https://ip:端口/api'