Get header configuration
GET
/
cloud-cdn
/
distributions
/
configurations
/
headers
Get header configuration
curl --request GET \
--url https://api.aptranet.com/cloud-cdn/distributions/configurations/headers \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/configurations/headers"
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Aptranet-Secret': '<api-key>'}
};
fetch('https://api.aptranet.com/cloud-cdn/distributions/configurations/headers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-cdn/distributions/configurations/headers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"cors_headers": {
"enabled": true,
"mode": "all_origins",
"add_always": true,
"origins": [
"<string>"
],
"value": "<string>"
},
"custom_host_header": {
"enabled": true,
"mode": "custom",
"value": "<string>"
},
"static_request_headers": {
"enabled": true,
"headers": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"static_response_headers": {
"enabled": true,
"headers": [
{
"name": "<string>",
"value": "<string>",
"always": true
}
]
},
"response_headers_hiding_policy": {
"enabled": true,
"mode": "hide",
"excepted": [
"<string>"
]
}
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}Authorizations
Access key beginning with APTRANET_.
Current secret paired with the access key.
Query Parameters
Distribution identifier.
Required range:
x >= 1Response
Header configuration.
Get header configuration
curl --request GET \
--url https://api.aptranet.com/cloud-cdn/distributions/configurations/headers \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/configurations/headers"
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Aptranet-Secret': '<api-key>'}
};
fetch('https://api.aptranet.com/cloud-cdn/distributions/configurations/headers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-cdn/distributions/configurations/headers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"cors_headers": {
"enabled": true,
"mode": "all_origins",
"add_always": true,
"origins": [
"<string>"
],
"value": "<string>"
},
"custom_host_header": {
"enabled": true,
"mode": "custom",
"value": "<string>"
},
"static_request_headers": {
"enabled": true,
"headers": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"static_response_headers": {
"enabled": true,
"headers": [
{
"name": "<string>",
"value": "<string>",
"always": true
}
]
},
"response_headers_hiding_policy": {
"enabled": true,
"mode": "hide",
"excepted": [
"<string>"
]
}
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}