HTTPS相关接口
更新时间:2023-05-16
设置HTTPS加速
public void setDomainHttpsConfig(CdnClient client){
String domain = "my.test.com";
HttpsConfig httpsConfig = new HttpsConfig().withEnabled(true).withCertId("ssl-82fdaufdsaldsuaow");
client.setDomainHttpsConfig(new SetDomainHttpsConfigRequest()
.withDomain(domain)
.withHttps(httpsConfig));
}
设置HSTS配置
public void setDomainHSTS(CdnClient client){
String domain = "my.test.com";
Hsts HSTS = new Hsts().withMaxAge(100).withIncludeSubDomains(true).withPreload(false);
client.setDomainHSTS(new SetDomainHSTSRequest().withDomain(domain).withHSTS(HSTS));
}
查询HSTS配置
public void getDomainHSTS(CdnClient client) {
String domain = "my.test.com";
GetDomainHSTSResponse response = client.getDomainHSTS(domain);
}
设置OCSP配置
public void setDomainOCSPSwitch(CdnClient client){
String domain = "my.test.com";
client.setDomainOCSPSwitch(domain, true);
}
查询OCSP配置
public void getDomainOCSP(CdnClient client) {
String domain = "my.test.com";
GetDomainOCSPSwitchResponse response = client.getDomainOCSPSwitch(domain);
}