此错误提示表明您的服务器端不支持TLS 1.2或更高版本。由于Cloudflare强制使用TLS 1.2及更高版本,因此无法通过HTTPS访问站点。要解决此问题,您需要在您的服务器端配置TLS版本。以下是一个Nginx和Apache的示例代码:
Nginx:
server {
listen 443 ssl;
server_name example.com;
ssl_protocols TLSv1.2;
ssl_certificate /path/to/cert.crt;
ssl_certificate_key /path/to/cert.key;
...
}
Apache:
ServerName example.com
SSLEngine on
SSLProtocol TLSv1.2
SSLCertificateFile /path/to/cert.crt
SSLCertificateKeyFile /path/to/cert.key
...
请注意,在上述代码示例中,您需要将“/path/to/cert.crt”和“/path/to/cert.key”替换为您的SSL证书和密钥的实际路径。
完成这些配置后,您的API将能够通过HTTPS访问。