HTTPS相关配置
更新时间:2023-05-16
下列代码中对函数入参c即是CdnClient对象,详情参见CdnClient
设置https
def test_set_domain_https(c):
"""
test_set_domain_https
"""
https = {
'enabled': True,
'certId': 'cert-rm45x46isit4',
}
response = c.set_domain_https('test.example.com', https)
print(response)
设置ocsp
当域名开启了https时才能开启ocsp配置
def test_set_ocsp(c):
"""
test_set_ocsp
"""
ocsp = False
response = c.set_domain_ocsp('example.test.com', ocsp)
print(response)
查询ocsp配置
def test_get_ocsp(c):
"""
test_get_ocsp
"""
response = c.get_domain_ocsp('example.test.com')
print(response)