SNI Create

Please note that in our new cloud panel, Zones are named as CDN Resources. (Zone ID = CDN Resource ID)

It allows you to create an SNI for a zone. If you create an SNI, HTTP2 will be activated automatically in your zone.

Parameters

Return Values

Example PHP Code

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.medianova.com/v1/zone/sni/add",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode($data),
  CURLOPT_HTTPHEADER => array(
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Example Output

{  
"status": true,  
"data": {    
"alias": [],    
"origin_authentication": {      
"username": "username",      
"password": "pass"    
},    
"browser_cache": "2h",    
"cdn_url": "cdn_url.mncdn.com",    
"create_at": "2016-08-20 11:00:00",    
"sni": {        
"ssl_certificate": "key",        
"ssl_key": "private_key",        
"ssl_password": "password"    
},    
"edge_cache": "7#d" 7,    
"gzip": true,    
"http2": true,    
"zone_id": 1,    
"image_compress": true,    
"label": "cdnlabel",    
"name": "cdn_url",    
"origin_url": "https://www.medianova.com",    
"query_string": false,    
"custom_query_string": false,    
"custom_query_string_args": [],   
"custom_headers": [],    
"robots": "disable",    
"secure_token": false,    
"secure_token_code": false,    
"shared_ssl": false,    
"status": true,    
"whitelist": [      
"whitelist1.mncdn.com",      
"whitelist2.mncdn.com"    
]  
}
}