import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
cdn_resource_rule = client.cdn.resources.rules.replace(
rule_id=0,
resource_id=0,
rule="/folder/images/*.png",
rule_type=0,
)
print(cdn_resource_rule.id){
"id": 5,
"name": "My first rule",
"active": true,
"deleted": false,
"originGroup": null,
"rule": "/folder/images/*.png",
"ruleType": 0,
"weight": 1,
"originProtocol": "HTTPS",
"overrideOriginProtocol": "HTTPS",
"preset_applied": false,
"primary_rule": null,
"options": {
"allowedHttpMethods": {
"enabled": true,
"value": [
"GET",
"POST"
]
},
"bot_protection": {
"enabled": true,
"bot_challenge": {
"enabled": true
}
},
"brotli_compression": {
"enabled": true,
"value": [
"text/html",
"text/plain"
]
},
"browser_cache_settings": {
"enabled": true,
"value": "3600s"
},
"cache_http_headers": {
"enabled": false,
"value": [
"vary",
"content-length",
"last-modified",
"connection",
"accept-ranges",
"content-type",
"content-encoding",
"etag",
"cache-control",
"expires",
"keep-alive",
"server"
]
},
"cors": {
"enabled": true,
"value": [
"domain.com",
"domain2.com"
],
"always": true
},
"country_acl": {
"enabled": true,
"policy_type": "allow",
"excepted_values": [
"GB",
"DE"
]
},
"disable_cache": {
"enabled": true,
"value": false
},
"disable_proxy_force_ranges": {
"enabled": true,
"value": true
},
"edge_cache_settings": {
"enabled": true,
"value": "43200s",
"custom_values": {
"100": "43200s"
}
},
"fastedge": {
"enabled": true,
"on_request_headers": {
"enabled": true,
"app_id": "1001",
"interrupt_on_error": true
}
},
"fetch_compressed": {
"enabled": true,
"value": false
},
"follow_origin_redirect": {
"enabled": true,
"codes": [
302,
308
]
},
"force_return": {
"enabled": true,
"code": 301,
"body": "http://example.com/redirect_address",
"time_interval": {
"start_time": "09:00",
"end_time": "20:00",
"time_zone": "CET"
}
},
"forward_host_header": {
"enabled": false,
"value": false
},
"gzipOn": {
"enabled": true,
"value": true
},
"hostHeader": {
"enabled": true,
"value": "host.com"
},
"ignore_cookie": {
"enabled": true,
"value": true
},
"ignoreQueryString": {
"enabled": true,
"value": false
},
"image_stack": {
"enabled": true,
"avif_enabled": true,
"webp_enabled": false,
"quality": 80,
"png_lossless": true
},
"ip_address_acl": {
"enabled": true,
"policy_type": "deny",
"excepted_values": [
"192.168.1.100/32"
]
},
"limit_bandwidth": {
"enabled": true,
"limit_type": "static",
"speed": 100,
"buffer": 200
},
"proxy_cache_key": {
"enabled": true,
"value": "$scheme$uri"
},
"proxy_cache_methods_set": {
"enabled": true,
"value": false
},
"proxy_connect_timeout": {
"enabled": true,
"value": "4s"
},
"proxy_read_timeout": {
"enabled": true,
"value": "10s"
},
"query_params_blacklist": {
"enabled": true,
"value": [
"some",
"blacklisted",
"query"
]
},
"query_params_whitelist": {
"enabled": true,
"value": [
"some",
"whitelisted",
"query"
]
},
"query_string_forwarding": {
"enabled": true,
"forward_from_file_types": [
"m3u8",
"mpd"
],
"forward_to_file_types": [
"ts",
"mp4"
],
"forward_only_keys": [
"auth_token",
"session_id"
],
"forward_except_keys": [
"debug_info"
]
},
"redirect_http_to_https": {
"enabled": true,
"value": true
},
"redirect_https_to_http": {
"enabled": false,
"value": true
},
"referrer_acl": {
"enabled": true,
"policy_type": "deny",
"excepted_values": [
"example.com",
"*.example.net"
]
},
"request_limiter": {
"enabled": true,
"rate_unit": "r/s",
"rate": 5,
"burst": 5,
"delay": 0
},
"response_headers_hiding_policy": {
"enabled": true,
"mode": "hide",
"excepted": [
"my-header"
]
},
"rewrite": {
"enabled": true,
"body": "/(.*) /additional_path/$1",
"flag": "break"
},
"secure_key": {
"enabled": true,
"key": "secretkey",
"type": 2
},
"slice": {
"enabled": true,
"value": true
},
"sni": {
"enabled": true,
"sni_type": "custom",
"custom_hostname": "custom.example.com"
},
"stale": {
"enabled": true,
"value": [
"http_404",
"http_500"
]
},
"static_response_headers": {
"enabled": true,
"value": [
{
"name": "X-Example",
"value": [
"Value_1"
],
"always": true
},
{
"name": "X-Example-Multiple",
"value": [
"Value_1",
"Value_2",
"Value_3"
],
"always": false
}
]
},
"staticHeaders": {
"enabled": true,
"value": {
"X-Example": "Value_1",
"X-Example-Multiple": [
"Value_2",
"Value_3"
]
}
},
"staticRequestHeaders": {
"enabled": true,
"value": {
"Header-One": "Value 1",
"Header-Two": "Value 2"
}
},
"user_agent_acl": {
"enabled": true,
"policy_type": "allow",
"excepted_values": [
"UserAgent Value",
""
]
},
"waap": {
"enabled": true,
"value": true
},
"websockets": {
"enabled": true,
"value": true
}
}
}import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
cdn_resource_rule = client.cdn.resources.rules.replace(
rule_id=0,
resource_id=0,
rule="/folder/images/*.png",
rule_type=0,
)
print(cdn_resource_rule.id){
"id": 5,
"name": "My first rule",
"active": true,
"deleted": false,
"originGroup": null,
"rule": "/folder/images/*.png",
"ruleType": 0,
"weight": 1,
"originProtocol": "HTTPS",
"overrideOriginProtocol": "HTTPS",
"preset_applied": false,
"primary_rule": null,
"options": {
"allowedHttpMethods": {
"enabled": true,
"value": [
"GET",
"POST"
]
},
"bot_protection": {
"enabled": true,
"bot_challenge": {
"enabled": true
}
},
"brotli_compression": {
"enabled": true,
"value": [
"text/html",
"text/plain"
]
},
"browser_cache_settings": {
"enabled": true,
"value": "3600s"
},
"cache_http_headers": {
"enabled": false,
"value": [
"vary",
"content-length",
"last-modified",
"connection",
"accept-ranges",
"content-type",
"content-encoding",
"etag",
"cache-control",
"expires",
"keep-alive",
"server"
]
},
"cors": {
"enabled": true,
"value": [
"domain.com",
"domain2.com"
],
"always": true
},
"country_acl": {
"enabled": true,
"policy_type": "allow",
"excepted_values": [
"GB",
"DE"
]
},
"disable_cache": {
"enabled": true,
"value": false
},
"disable_proxy_force_ranges": {
"enabled": true,
"value": true
},
"edge_cache_settings": {
"enabled": true,
"value": "43200s",
"custom_values": {
"100": "43200s"
}
},
"fastedge": {
"enabled": true,
"on_request_headers": {
"enabled": true,
"app_id": "1001",
"interrupt_on_error": true
}
},
"fetch_compressed": {
"enabled": true,
"value": false
},
"follow_origin_redirect": {
"enabled": true,
"codes": [
302,
308
]
},
"force_return": {
"enabled": true,
"code": 301,
"body": "http://example.com/redirect_address",
"time_interval": {
"start_time": "09:00",
"end_time": "20:00",
"time_zone": "CET"
}
},
"forward_host_header": {
"enabled": false,
"value": false
},
"gzipOn": {
"enabled": true,
"value": true
},
"hostHeader": {
"enabled": true,
"value": "host.com"
},
"ignore_cookie": {
"enabled": true,
"value": true
},
"ignoreQueryString": {
"enabled": true,
"value": false
},
"image_stack": {
"enabled": true,
"avif_enabled": true,
"webp_enabled": false,
"quality": 80,
"png_lossless": true
},
"ip_address_acl": {
"enabled": true,
"policy_type": "deny",
"excepted_values": [
"192.168.1.100/32"
]
},
"limit_bandwidth": {
"enabled": true,
"limit_type": "static",
"speed": 100,
"buffer": 200
},
"proxy_cache_key": {
"enabled": true,
"value": "$scheme$uri"
},
"proxy_cache_methods_set": {
"enabled": true,
"value": false
},
"proxy_connect_timeout": {
"enabled": true,
"value": "4s"
},
"proxy_read_timeout": {
"enabled": true,
"value": "10s"
},
"query_params_blacklist": {
"enabled": true,
"value": [
"some",
"blacklisted",
"query"
]
},
"query_params_whitelist": {
"enabled": true,
"value": [
"some",
"whitelisted",
"query"
]
},
"query_string_forwarding": {
"enabled": true,
"forward_from_file_types": [
"m3u8",
"mpd"
],
"forward_to_file_types": [
"ts",
"mp4"
],
"forward_only_keys": [
"auth_token",
"session_id"
],
"forward_except_keys": [
"debug_info"
]
},
"redirect_http_to_https": {
"enabled": true,
"value": true
},
"redirect_https_to_http": {
"enabled": false,
"value": true
},
"referrer_acl": {
"enabled": true,
"policy_type": "deny",
"excepted_values": [
"example.com",
"*.example.net"
]
},
"request_limiter": {
"enabled": true,
"rate_unit": "r/s",
"rate": 5,
"burst": 5,
"delay": 0
},
"response_headers_hiding_policy": {
"enabled": true,
"mode": "hide",
"excepted": [
"my-header"
]
},
"rewrite": {
"enabled": true,
"body": "/(.*) /additional_path/$1",
"flag": "break"
},
"secure_key": {
"enabled": true,
"key": "secretkey",
"type": 2
},
"slice": {
"enabled": true,
"value": true
},
"sni": {
"enabled": true,
"sni_type": "custom",
"custom_hostname": "custom.example.com"
},
"stale": {
"enabled": true,
"value": [
"http_404",
"http_500"
]
},
"static_response_headers": {
"enabled": true,
"value": [
{
"name": "X-Example",
"value": [
"Value_1"
],
"always": true
},
{
"name": "X-Example-Multiple",
"value": [
"Value_1",
"Value_2",
"Value_3"
],
"always": false
}
]
},
"staticHeaders": {
"enabled": true,
"value": {
"X-Example": "Value_1",
"X-Example-Multiple": [
"Value_2",
"Value_3"
]
}
},
"staticRequestHeaders": {
"enabled": true,
"value": {
"Header-One": "Value 1",
"Header-Two": "Value 2"
}
},
"user_agent_acl": {
"enabled": true,
"policy_type": "allow",
"excepted_values": [
"UserAgent Value",
""
]
},
"waap": {
"enabled": true,
"value": true
},
"websockets": {
"enabled": true,
"value": true
}
}
}API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Path to the file or folder for which the rule will be applied.
The rule is applied if the requested URI matches the rule path.
We add a leading forward slash to any rule path. Specify a path without a forward slash.
300"/folder/images/*.png"
Rule type.
Possible values:
0 <= x <= 10
Enables or disables a rule.
Possible values:
true
Rule name.
255"My first rule"
Rule execution order: from lowest (1) to highest.
If requested URI matches multiple rules, the one higher in the order of the rules will be applied.
1 <= x <= 21474836471
Sets a protocol other than the one specified in the CDN resource settings to connect to the origin.
Possible values:
originProtocol setting is inherited from the CDN resource settings.HTTPS, HTTP, MATCH ID of the origin group to which the rule is applied.
If the origin group is not specified, the rule is applied to the origin group that the CDN resource is associated with.
null
List of options that can be configured for the rule.
In case of null value the option is not added to the rule.
Option inherits its value from the CDN resource settings.
Show child attributes
HTTP methods allowed for content requests from the CDN.
{ "enabled": true, "value": ["GET", "POST"] }Allows to prevent online services from overloading and ensure your business workflow running smoothly.
Show child attributes
Controls the option state.
Possible values:
{
"enabled": true,
"bot_challenge": { "enabled": true }
}Compresses content with Brotli on the CDN side. CDN servers will request only uncompressed content from the origin.
Notes:
brotli_compression is not supported with fetch_compressed or slice options enabled.fetch_compressed option in CDN resource settings overrides brotli_compression in rules. If you enabled fetch_compressed in CDN resource and want to enable brotli_compression in a rule, you must specify fetch_compressed:false in the rule.Show child attributes
Controls the option state.
Possible values:
Allows to select the content types you want to compress.
text/html is a mandatory content type.
application/javascript, application/json, application/vnd.ms-fontobject, application/wasm, application/x-font-ttf, application/x-javascript, application/xml, application/xml+rss, image/svg+xml, image/x-icon, text/css, text/html, text/javascript, text/plain, text/xml {
"enabled": true,
"value": ["text/html", "text/plain"]
}Cache expiration time for users browsers in seconds.
Cache expiration time is applied to the following response codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.
Responses with other codes will not be cached.
Show child attributes
Controls the option state.
Possible values:
Set the cache expiration time to '0s' to disable caching.
The maximum duration is any equivalent to 1y.
{ "enabled": true, "value": "3600s" }Legacy option. Use the response_headers_hiding_policy option instead.
HTTP Headers that must be included in the response.
{
"enabled": false,
"value": [
"vary",
"content-length",
"last-modified",
"connection",
"accept-ranges",
"content-type",
"content-encoding",
"etag",
"cache-control",
"expires",
"keep-alive",
"server"
]
}Enables or disables CORS (Cross-Origin Resource Sharing) header support.
CORS header support allows the CDN to add the Access-Control-Allow-Origin header to a response to a browser.
Show child attributes
Controls the option state.
Possible values:
Value of the Access-Control-Allow-Origin header.
Possible values:
"value": ["*"]http_origin" as the Access-Control-Allow-Origin header value if the origin matches one of the listed domains - Content will be uploaded only for requests from the domains specified in the field.
"value": ["domain.com", "second.dom.com"]http_origin" as the Access-Control-Allow-Origin header value - Content will be uploaded for requests from any domain, and the domain from which the request was sent will be added to the "Access-Control-Allow-Origin" header in the response.
"value": ["$http_origin"]Defines whether the Access-Control-Allow-Origin header should be added to a response from CDN regardless of response code.
Possible values:
{
"enabled": true,
"value": ["domain.com", "domain2.com"],
"always": true
}Enables control access to content for specified countries.
Show child attributes
Controls the option state.
Possible values:
Defines the type of CDN resource access policy.
Possible values:
excepted_values field.excepted_values field.allow, deny List of countries according to ISO-3166-1.
The meaning of the parameter depends on policy_type value:
600255{
"enabled": true,
"policy_type": "allow",
"excepted_values": ["GB", "DE"]
}Legacy option. Use the edge_cache_settings option instead.
Allows the complete disabling of content caching.
{ "enabled": true, "value": false }Allows 206 responses regardless of the settings of an origin source.
Show child attributes
{ "enabled": true, "value": true }Cache expiration time for CDN servers.
value and default fields cannot be used simultaneously.
Show child attributes
Controls the option state.
Possible values:
Caching time.
The value is applied to the following response codes: 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached.
Use 0s to disable caching.
The maximum duration is any equivalent to 1y.
A MAP object representing the caching time in seconds for a response with a specific response code.
These settings have a higher priority than the value field.
any key to specify caching time for all response codes.0s value to disable caching for a specific response code.Show child attributes
Enables content caching according to the origin cache settings.
The value is applied to the following response codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308, if an origin server does not have caching HTTP headers.
Responses with other codes will not be cached.
The maximum duration is any equivalent to 1y.
{
"enabled": true,
"value": "43200s",
"custom_values": { "100": "43200s" }
}Allows to configure FastEdge app to be called on different request/response phases.
Note: At least one of on_request_headers, on_request_body, on_response_headers, or on_response_body must be specified.
Show child attributes
Controls the option state.
Possible values:
Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
Show child attributes
The ID of the application in FastEdge.
"1001"
Determines if the FastEdge application should be called whenever HTTP request headers are received.
true
Determines if the request execution should be interrupted when an error occurs.
true
Determines if the request should be executed at the edge nodes.
true
Determines if the request should be executed at the shield nodes.
false
Allows to configure FastEdge application that will be called to handle request body as soon as CDN receives incoming HTTP request.
Show child attributes
The ID of the application in FastEdge.
"1001"
Determines if the FastEdge application should be called whenever HTTP request headers are received.
true
Determines if the request execution should be interrupted when an error occurs.
true
Determines if the request should be executed at the edge nodes.
true
Determines if the request should be executed at the shield nodes.
false
Allows to configure FastEdge application that will be called to handle response headers before CDN sends the HTTP response.
Show child attributes
The ID of the application in FastEdge.
"1001"
Determines if the FastEdge application should be called whenever HTTP request headers are received.
true
Determines if the request execution should be interrupted when an error occurs.
true
Determines if the request should be executed at the edge nodes.
true
Determines if the request should be executed at the shield nodes.
false
Allows to configure FastEdge application that will be called to handle response body before CDN sends the HTTP response.
Show child attributes
The ID of the application in FastEdge.
"1001"
Determines if the FastEdge application should be called whenever HTTP request headers are received.
true
Determines if the request execution should be interrupted when an error occurs.
true
Determines if the request should be executed at the edge nodes.
true
Determines if the request should be executed at the shield nodes.
false
{
"enabled": true,
"on_request_headers": {
"enabled": true,
"app_id": "1001",
"interrupt_on_error": true
}
}Makes the CDN request compressed content from the origin.
The origin server should support compression. CDN servers will not decompress your content even if a user browser does not accept compression.
Notes:
fetch_compressed is not supported with gzipON or brotli_compression or slice options enabled.fetch_compressed overrides gzipON and brotli_compression in rule. If you enable it in CDN resource and want to use gzipON and brotli_compression in a rule, you have to specify "fetch_compressed": false in the rule.{ "enabled": true, "value": false }Enables redirection from origin. If the origin server returns a redirect, the option allows the CDN to pull the requested content from the origin server that was returned in the redirect.
Show child attributes
Controls the option state.
Possible values:
Redirect status code that the origin server returns.
To serve up to date content to end users, you will need to purge the cache after managing the option.
1301, 302, 303, 307, 308 { "enabled": true, "codes": [302, 308] }Applies custom HTTP response codes for CDN content.
The following codes are reserved by our system and cannot be specified in this option: 408, 444, 477, 494, 495, 496, 497, 499.
Show child attributes
Controls the option state.
Possible values:
Status code value.
100 <= x <= 599URL for redirection or text.
255Controls the time at which a custom HTTP response code should be applied. By default, a custom HTTP response code is applied at any time.
Show child attributes
Time from which a custom HTTP response code should be applied. Indicated in 24-hour format.
"06:00"
Time until which a custom HTTP response code should be applied. Indicated in 24-hour format.
"18:00"
Time zone used to calculate time.
"Europe/Luxembourg"
{
"enabled": true,
"code": 301,
"body": "http://example.com/redirect_address",
"time_interval": {
"start_time": "09:00",
"end_time": "20:00",
"time_zone": "CET"
}
}Forwards the Host header from a end-user request to an origin server.
hostHeader and forward_host_header options cannot be enabled simultaneously.
{ "enabled": false, "value": false }Compresses content with gzip on the CDN end. CDN servers will request only uncompressed content from the origin.
Notes:
fetch_compressed or slice options enabled.fetch_compressed option in CDN resource settings overrides gzipON in rules. If you enable fetch_compressed in CDN resource and want to enable gzipON in rules, you need to specify "fetch_compressed":false for rules.{ "enabled": true, "value": true }Sets the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header.
If the option is null, the Host Header value is equal to first CNAME.
hostHeader and forward_host_header options cannot be enabled simultaneously.
{ "enabled": true, "value": "host.com" }Defines whether the files with the Set-Cookies header are cached as one file or as different ones.
Show child attributes
Controls the option state.
Possible values:
Possible values:
{ "enabled": true, "value": true }How a file with different query strings is cached: either as one object (option is enabled) or as different objects (option is disabled.)
ignoreQueryString, query_params_whitelist and query_params_blacklist options cannot be enabled simultaneously.
{ "enabled": true, "value": false }Transforms JPG and PNG images (for example, resize or crop) and automatically converts them to WebP or AVIF format.
Show child attributes
Controls the option state.
Possible values:
Enables or disables automatic conversion of JPEG and PNG images to AVI format.
Enables or disables automatic conversion of JPEG and PNG images to WebP format.
Defines quality settings for JPG and PNG images. The higher the value, the better the image quality, and the larger the file size after conversion.
1 <= x <= 100Enables or disables compression without quality loss for PNG format.
{
"enabled": true,
"avif_enabled": true,
"webp_enabled": false,
"quality": 80,
"png_lossless": true
}Controls access to the CDN resource content for specific IP addresses.
If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. We recommend you use a script for automatically update IP ACL. Read more.
Show child attributes
Controls the option state.
Possible values:
IP access policy type.
Possible values:
excepted_values" field.excepted_values" field.allow, deny List of IP addresses with a subnet mask.
The meaning of the parameter depends on policy_type value:
Examples:
192.168.3.2/322a03:d000:2980:7::8/128600255{
"enabled": true,
"policy_type": "deny",
"excepted_values": ["192.168.1.100/32"]
}Allows to control the download speed per connection.
Show child attributes
Controls the option state.
Possible values:
Method of controlling the download speed per connection.
Possible values:
For example, when requesting content at the link
http://cdn.example.com/video.mp4?speed=50k&buffer=500kthe download speed will be limited to 50kB/s after 500 kB.
static, dynamic Maximum download speed per connection.
1 <= x <= 1000000000Amount of downloaded data after which the user will be rate limited.
0 <= x <= 1000000000{
"enabled": true,
"limit_type": "static",
"speed": 100,
"buffer": 200
}Allows you to modify your cache key. If omitted, the default value is $request_uri.
Combine the specified variables to create a key for caching.
request_uriWarning: Enabling and changing this option can invalidate your current cache and affect the cache hit ratio. Furthermore, the "Purge by pattern" option will not work.
{ "enabled": true, "value": "$scheme$uri" }Caching for POST requests along with default GET and HEAD.
{ "enabled": true, "value": false }The time limit for establishing a connection with the origin.
{ "enabled": true, "value": "4s" }The time limit for receiving a partial response from the origin. If no response is received within this time, the connection will be closed.
Note: When used with a WebSocket connection, this option supports values only in the range 1–20 seconds (instead of the usual 1–30 seconds).
{ "enabled": true, "value": "10s" }Files with the specified query parameters are cached as one object, files with other parameters are cached as different objects.
ignoreQueryString, query_params_whitelist and query_params_blacklist options cannot be enabled simultaneously.
{
"enabled": true,
"value": ["some", "blacklisted", "query"]
}Files with the specified query parameters are cached as different objects, files with other parameters are cached as one object.
ignoreQueryString, query_params_whitelist and query_params_blacklist options cannot be enabled simultaneously.
{
"enabled": true,
"value": ["some", "whitelisted", "query"]
}The Query String Forwarding feature allows for the seamless transfer of parameters embedded in playlist files to the corresponding media chunk files. This functionality ensures that specific attributes, such as authentication tokens or tracking information, are consistently passed along from the playlist manifest to the individual media segments. This is particularly useful for maintaining continuity in security, analytics, and any other parameter-based operations across the entire media delivery workflow.
Show child attributes
Controls the option state.
Possible values:
The forward_from_files_types field specifies the types of playlist files from which parameters will be extracted and forwarded.
This typically includes formats that list multiple media chunk references, such as HLS and DASH playlists.
Parameters associated with these playlist files (like query strings or headers) will be propagated to the chunks they reference.
The field specifies the types of media chunk files to which parameters, extracted from playlist files, will be forwarded. These refer to the actual segments of media content that are delivered to viewers. Ensuring the correct parameters are forwarded to these files is crucial for maintaining the integrity of the streaming session.
The forward_only_keys field allows for granular control over which specific parameters are forwarded from playlist files to media chunk files.
By specifying certain keys, only those parameters will be propagated, ensuring that only relevant information is passed along.
This is particularly useful for security and performance optimization, as it prevents unnecessary or sensitive data from being included in requests for media chunks.
The forward_except_keys field provides a mechanism to exclude specific parameters from being forwarded from playlist files to media chunk files.
By listing certain keys in this field, you can ensure that these parameters are omitted during the forwarding process.
This is particularly useful for preventing sensitive or irrelevant information from being included in requests for media chunks, thereby enhancing security and optimizing performance.
{
"enabled": true,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
"forward_only_keys": ["auth_token", "session_id"],
"forward_except_keys": ["debug_info"]
}Enables redirect from HTTP to HTTPS.
redirect_http_to_https and redirect_https_to_http options cannot be enabled simultaneously.
{ "enabled": true, "value": true }Enables redirect from HTTPS to HTTP.
redirect_http_to_https and redirect_https_to_http options cannot be enabled simultaneously.
{ "enabled": false, "value": true }Controls access to the CDN resource content for specified domain names.
Show child attributes
Controls the option state.
Possible values:
Policy type.
Possible values:
excepted_values field.excepted_values field.allow, deny List of domain names or wildcard domains (without protocol: http:// or https://.)
The meaning of the parameter depends on policy_type value:
Examples:
example.com*.example.com600255{
"enabled": true,
"policy_type": "deny",
"excepted_values": ["example.com", "*.example.net"]
}Option allows to limit the amount of HTTP requests.
Show child attributes
Controls the option state.
Possible values:
Maximum request rate.
x >= 1Units of measurement for the rate field.
Possible values:
If the rate is less than one request per second, it is specified in request per minute (r/m.)
r/s, r/m {
"enabled": true,
"rate_unit": "r/s",
"rate": 5,
"burst": 5,
"delay": 0
}Hides HTTP headers from an origin server in the CDN response.
Show child attributes
Controls the option state.
Possible values:
How HTTP headers are hidden from the response.
Possible values:
excepted field.hide, show List of HTTP headers.
Parameter meaning depends on the value of the mode field:
The following headers are required and cannot be hidden from response:
ConnectionContent-LengthContent-TypeDateServer256128{
"enabled": true,
"mode": "hide",
"excepted": ["my-header"]
}Changes and redirects requests from the CDN to the origin. It operates according to the Nginx configuration.
Show child attributes
Controls the option state.
Possible values:
Path for the Rewrite option.
Example:
/(.*) /media/$1255Flag for the Rewrite option.
Possible values:
ngx_http_rewrite_module directives and start a search for a new location matching changed URI.http://, https://, or $scheme.break, last, redirect, permanent {
"enabled": true,
"body": "/(.*) /additional_path/$1",
"flag": "break"
}Configures access with tokenized URLs. This makes impossible to access content without a valid (unexpired) token.
Show child attributes
Controls the option state.
Possible values:
Key generated on your side that will be used for URL signing.
255Type of URL signing.
Possible types:
0, 2 {
"enabled": true,
"key": "secretkey",
"type": 2
}Requests and caches files larger than 10 MB in parts (no larger than 10 MB per part.) This reduces time to first byte.
The option is based on the Slice module.
Notes:
gzipON, brotli_compression or fetch_compressed options enabled.{ "enabled": true, "value": true }The hostname that is added to SNI requests from CDN servers to the origin server via HTTPS.
SNI is generally only required if your origin uses shared hosting or does not have a dedicated IP address. If the origin server presents multiple certificates, SNI allows the origin server to know which certificate to use for the connection.
The option works only if originProtocol parameter is HTTPS or MATCH.
Show child attributes
Controls the option state.
Possible values:
Custom SNI hostname.
It is required if sni_type is set to custom.
255SNI (Server Name Indication) type.
Possible values:
hostHeader and forward_host_header options.
It has several possible combinations:hostHeader option is enabled and specified, SNI hostname matches the Host header.forward_host_header option is enabled and has true value, SNI hostname matches the Host header used in the request made to a CDN.hostHeader and forward_host_header options are disabled, SNI hostname matches the primary CNAME.dynamic, custom {
"enabled": true,
"sni_type": "custom",
"custom_hostname": "custom.example.com"
}Serves stale cached content in case of origin unavailability.
Show child attributes
Controls the option state.
Possible values:
Defines list of errors for which "Always online" option is applied.
error, http_403, http_404, http_429, http_500, http_502, http_503, http_504, invalid_header, timeout, updating {
"enabled": true,
"value": ["http_404", "http_500"]
}Custom HTTP Headers that a CDN server adds to a response.
Show child attributes
Controls the option state.
Possible values:
50Show child attributes
HTTP Header name.
Restrictions:
128Header value.
Restrictions:
Defines whether the header will be added to a response from CDN regardless of response code.
Possible values:
{
"enabled": true,
"value": [
{
"name": "X-Example",
"value": ["Value_1"],
"always": true
},
{
"name": "X-Example-Multiple",
"value": ["Value_1", "Value_2", "Value_3"],
"always": false
}
]
}Legacy option. Use the static_response_headers option instead.
Custom HTTP Headers that a CDN server adds to response. Up to fifty custom HTTP Headers can be specified. May contain a header with multiple values.
Show child attributes
Controls the option state.
Possible values:
A MAP for static headers in a format of header_name: header_value.
Restrictions:
{
"enabled": true,
"value": {
"X-Example": "Value_1",
"X-Example-Multiple": ["Value_2", "Value_3"]
}
}Custom HTTP Headers for a CDN server to add to request. Up to fifty custom HTTP Headers can be specified.
Show child attributes
Controls the option state.
Possible values:
A MAP for static headers in a format of header_name: header_value.
Restrictions:
Show child attributes
{
"enabled": true,
"value": {
"Header-One": "Value 1",
"Header-Two": "Value 2"
}
}Controls access to the content for specified User-Agents.
Show child attributes
Controls the option state.
Possible values:
User-Agents policy type.
Possible values:
excepted_values field.excepted_values field.allow, deny List of User-Agents that will be allowed/denied.
The meaning of the parameter depends on policy_type:
Use an empty string "" to allow/deny access when the User-Agent header is empty.
600255{
"enabled": true,
"policy_type": "allow",
"excepted_values": ["UserAgent Value", ""]
}Allows to enable WAAP (Web Application and API Protection).
{ "enabled": true, "value": true }Enables or disables WebSockets connections to an origin server.
{ "enabled": true, "value": true }Successful.
Rule ID.
5
Rule name.
255"My first rule"
Enables or disables a rule.
Possible values:
true
Defines whether the rule has been deleted.
Possible values:
false
ID of the origin group to which the rule is applied.
If the origin group is not specified, the rule is applied to the origin group that the CDN resource is associated with.
null
Path to the file or folder for which the rule will be applied.
The rule is applied if the requested URI matches the rule path.
We add a leading forward slash to any rule path. Specify a path without a forward slash.
300"/folder/images/*.png"
Rule type.
Possible values:
0 <= x <= 10
Rule execution order: from lowest (1) to highest.
If requested URI matches multiple rules, the one higher in the order of the rules will be applied.
1 <= x <= 21474836471
Protocol used by CDN servers to request content from an origin source.
Possible values:
HTTPS, HTTP, MATCH "HTTPS"
Sets a protocol other than the one specified in the CDN resource settings to connect to the origin.
Possible values:
originProtocol setting is inherited from the CDN resource settings.HTTPS, HTTP, MATCH Defines whether the rule has an applied preset.
Possible values:
If a preset is applied to the rule, the options included in the preset cannot be edited for the rule.
false
ID of the rule with which the current rule is synchronized within the CDN resource shared cache zone feature.
null
List of options that can be configured for the rule.
In case of null value the option is not added to the rule.
Option inherits its value from the CDN resource settings.
Show child attributes
HTTP methods allowed for content requests from the CDN.
{ "enabled": true, "value": ["GET", "POST"] }Allows to prevent online services from overloading and ensure your business workflow running smoothly.
Show child attributes
Controls the option state.
Possible values:
{
"enabled": true,
"bot_challenge": { "enabled": true }
}Compresses content with Brotli on the CDN side. CDN servers will request only uncompressed content from the origin.
Notes:
brotli_compression is not supported with fetch_compressed or slice options enabled.fetch_compressed option in CDN resource settings overrides brotli_compression in rules. If you enabled fetch_compressed in CDN resource and want to enable brotli_compression in a rule, you must specify fetch_compressed:false in the rule.Show child attributes
Controls the option state.
Possible values:
Allows to select the content types you want to compress.
text/html is a mandatory content type.
application/javascript, application/json, application/vnd.ms-fontobject, application/wasm, application/x-font-ttf, application/x-javascript, application/xml, application/xml+rss, image/svg+xml, image/x-icon, text/css, text/html, text/javascript, text/plain, text/xml {
"enabled": true,
"value": ["text/html", "text/plain"]
}Cache expiration time for users browsers in seconds.
Cache expiration time is applied to the following response codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.
Responses with other codes will not be cached.
Show child attributes
Controls the option state.
Possible values:
Set the cache expiration time to '0s' to disable caching.
The maximum duration is any equivalent to 1y.
{ "enabled": true, "value": "3600s" }Legacy option. Use the response_headers_hiding_policy option instead.
HTTP Headers that must be included in the response.
{
"enabled": false,
"value": [
"vary",
"content-length",
"last-modified",
"connection",
"accept-ranges",
"content-type",
"content-encoding",
"etag",
"cache-control",
"expires",
"keep-alive",
"server"
]
}Enables or disables CORS (Cross-Origin Resource Sharing) header support.
CORS header support allows the CDN to add the Access-Control-Allow-Origin header to a response to a browser.
Show child attributes
Controls the option state.
Possible values:
Value of the Access-Control-Allow-Origin header.
Possible values:
"value": ["*"]http_origin" as the Access-Control-Allow-Origin header value if the origin matches one of the listed domains - Content will be uploaded only for requests from the domains specified in the field.
"value": ["domain.com", "second.dom.com"]http_origin" as the Access-Control-Allow-Origin header value - Content will be uploaded for requests from any domain, and the domain from which the request was sent will be added to the "Access-Control-Allow-Origin" header in the response.
"value": ["$http_origin"]Defines whether the Access-Control-Allow-Origin header should be added to a response from CDN regardless of response code.
Possible values:
{
"enabled": true,
"value": ["domain.com", "domain2.com"],
"always": true
}Enables control access to content for specified countries.
Show child attributes
Controls the option state.
Possible values:
Defines the type of CDN resource access policy.
Possible values:
excepted_values field.excepted_values field.allow, deny List of countries according to ISO-3166-1.
The meaning of the parameter depends on policy_type value:
600255{
"enabled": true,
"policy_type": "allow",
"excepted_values": ["GB", "DE"]
}Legacy option. Use the edge_cache_settings option instead.
Allows the complete disabling of content caching.
{ "enabled": true, "value": false }Allows 206 responses regardless of the settings of an origin source.
Show child attributes
{ "enabled": true, "value": true }Cache expiration time for CDN servers.
value and default fields cannot be used simultaneously.
Show child attributes
Controls the option state.
Possible values:
Caching time.
The value is applied to the following response codes: 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached.
Use 0s to disable caching.
The maximum duration is any equivalent to 1y.
A MAP object representing the caching time in seconds for a response with a specific response code.
These settings have a higher priority than the value field.
any key to specify caching time for all response codes.0s value to disable caching for a specific response code.Show child attributes
Enables content caching according to the origin cache settings.
The value is applied to the following response codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308, if an origin server does not have caching HTTP headers.
Responses with other codes will not be cached.
The maximum duration is any equivalent to 1y.
{
"enabled": true,
"value": "43200s",
"custom_values": { "100": "43200s" }
}Allows to configure FastEdge app to be called on different request/response phases.
Note: At least one of on_request_headers, on_request_body, on_response_headers, or on_response_body must be specified.
Show child attributes
Controls the option state.
Possible values:
Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
Show child attributes
The ID of the application in FastEdge.
"1001"
Determines if the FastEdge application should be called whenever HTTP request headers are received.
true
Determines if the request execution should be interrupted when an error occurs.
true
Determines if the request should be executed at the edge nodes.
true
Determines if the request should be executed at the shield nodes.
false
Allows to configure FastEdge application that will be called to handle request body as soon as CDN receives incoming HTTP request.
Show child attributes
The ID of the application in FastEdge.
"1001"
Determines if the FastEdge application should be called whenever HTTP request headers are received.
true
Determines if the request execution should be interrupted when an error occurs.
true
Determines if the request should be executed at the edge nodes.
true
Determines if the request should be executed at the shield nodes.
false
Allows to configure FastEdge application that will be called to handle response headers before CDN sends the HTTP response.
Show child attributes
The ID of the application in FastEdge.
"1001"
Determines if the FastEdge application should be called whenever HTTP request headers are received.
true
Determines if the request execution should be interrupted when an error occurs.
true
Determines if the request should be executed at the edge nodes.
true
Determines if the request should be executed at the shield nodes.
false
Allows to configure FastEdge application that will be called to handle response body before CDN sends the HTTP response.
Show child attributes
The ID of the application in FastEdge.
"1001"
Determines if the FastEdge application should be called whenever HTTP request headers are received.
true
Determines if the request execution should be interrupted when an error occurs.
true
Determines if the request should be executed at the edge nodes.
true
Determines if the request should be executed at the shield nodes.
false
{
"enabled": true,
"on_request_headers": {
"enabled": true,
"app_id": "1001",
"interrupt_on_error": true
}
}Makes the CDN request compressed content from the origin.
The origin server should support compression. CDN servers will not decompress your content even if a user browser does not accept compression.
Notes:
fetch_compressed is not supported with gzipON or brotli_compression or slice options enabled.fetch_compressed overrides gzipON and brotli_compression in rule. If you enable it in CDN resource and want to use gzipON and brotli_compression in a rule, you have to specify "fetch_compressed": false in the rule.{ "enabled": true, "value": false }Enables redirection from origin. If the origin server returns a redirect, the option allows the CDN to pull the requested content from the origin server that was returned in the redirect.
Show child attributes
Controls the option state.
Possible values:
Redirect status code that the origin server returns.
To serve up to date content to end users, you will need to purge the cache after managing the option.
1301, 302, 303, 307, 308 { "enabled": true, "codes": [302, 308] }Applies custom HTTP response codes for CDN content.
The following codes are reserved by our system and cannot be specified in this option: 408, 444, 477, 494, 495, 496, 497, 499.
Show child attributes
Controls the option state.
Possible values:
Status code value.
100 <= x <= 599URL for redirection or text.
255Controls the time at which a custom HTTP response code should be applied. By default, a custom HTTP response code is applied at any time.
Show child attributes
Time from which a custom HTTP response code should be applied. Indicated in 24-hour format.
"06:00"
Time until which a custom HTTP response code should be applied. Indicated in 24-hour format.
"18:00"
Time zone used to calculate time.
"Europe/Luxembourg"
{
"enabled": true,
"code": 301,
"body": "http://example.com/redirect_address",
"time_interval": {
"start_time": "09:00",
"end_time": "20:00",
"time_zone": "CET"
}
}Forwards the Host header from a end-user request to an origin server.
hostHeader and forward_host_header options cannot be enabled simultaneously.
{ "enabled": false, "value": false }Compresses content with gzip on the CDN end. CDN servers will request only uncompressed content from the origin.
Notes:
fetch_compressed or slice options enabled.fetch_compressed option in CDN resource settings overrides gzipON in rules. If you enable fetch_compressed in CDN resource and want to enable gzipON in rules, you need to specify "fetch_compressed":false for rules.{ "enabled": true, "value": true }Sets the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header.
If the option is null, the Host Header value is equal to first CNAME.
hostHeader and forward_host_header options cannot be enabled simultaneously.
{ "enabled": true, "value": "host.com" }Defines whether the files with the Set-Cookies header are cached as one file or as different ones.
Show child attributes
Controls the option state.
Possible values:
Possible values:
{ "enabled": true, "value": true }How a file with different query strings is cached: either as one object (option is enabled) or as different objects (option is disabled.)
ignoreQueryString, query_params_whitelist and query_params_blacklist options cannot be enabled simultaneously.
{ "enabled": true, "value": false }Transforms JPG and PNG images (for example, resize or crop) and automatically converts them to WebP or AVIF format.
Show child attributes
Controls the option state.
Possible values:
Enables or disables automatic conversion of JPEG and PNG images to AVI format.
Enables or disables automatic conversion of JPEG and PNG images to WebP format.
Defines quality settings for JPG and PNG images. The higher the value, the better the image quality, and the larger the file size after conversion.
1 <= x <= 100Enables or disables compression without quality loss for PNG format.
{
"enabled": true,
"avif_enabled": true,
"webp_enabled": false,
"quality": 80,
"png_lossless": true
}Controls access to the CDN resource content for specific IP addresses.
If you want to use IPs from our CDN servers IP list for IP ACL configuration, you have to independently monitor their relevance. We recommend you use a script for automatically update IP ACL. Read more.
Show child attributes
Controls the option state.
Possible values:
IP access policy type.
Possible values:
excepted_values" field.excepted_values" field.allow, deny List of IP addresses with a subnet mask.
The meaning of the parameter depends on policy_type value:
Examples:
192.168.3.2/322a03:d000:2980:7::8/128600255{
"enabled": true,
"policy_type": "deny",
"excepted_values": ["192.168.1.100/32"]
}Allows to control the download speed per connection.
Show child attributes
Controls the option state.
Possible values:
Method of controlling the download speed per connection.
Possible values:
For example, when requesting content at the link
http://cdn.example.com/video.mp4?speed=50k&buffer=500kthe download speed will be limited to 50kB/s after 500 kB.
static, dynamic Maximum download speed per connection.
1 <= x <= 1000000000Amount of downloaded data after which the user will be rate limited.
0 <= x <= 1000000000{
"enabled": true,
"limit_type": "static",
"speed": 100,
"buffer": 200
}Allows you to modify your cache key. If omitted, the default value is $request_uri.
Combine the specified variables to create a key for caching.
request_uriWarning: Enabling and changing this option can invalidate your current cache and affect the cache hit ratio. Furthermore, the "Purge by pattern" option will not work.
{ "enabled": true, "value": "$scheme$uri" }Caching for POST requests along with default GET and HEAD.
{ "enabled": true, "value": false }The time limit for establishing a connection with the origin.
{ "enabled": true, "value": "4s" }The time limit for receiving a partial response from the origin. If no response is received within this time, the connection will be closed.
Note: When used with a WebSocket connection, this option supports values only in the range 1–20 seconds (instead of the usual 1–30 seconds).
{ "enabled": true, "value": "10s" }Files with the specified query parameters are cached as one object, files with other parameters are cached as different objects.
ignoreQueryString, query_params_whitelist and query_params_blacklist options cannot be enabled simultaneously.
{
"enabled": true,
"value": ["some", "blacklisted", "query"]
}Files with the specified query parameters are cached as different objects, files with other parameters are cached as one object.
ignoreQueryString, query_params_whitelist and query_params_blacklist options cannot be enabled simultaneously.
{
"enabled": true,
"value": ["some", "whitelisted", "query"]
}The Query String Forwarding feature allows for the seamless transfer of parameters embedded in playlist files to the corresponding media chunk files. This functionality ensures that specific attributes, such as authentication tokens or tracking information, are consistently passed along from the playlist manifest to the individual media segments. This is particularly useful for maintaining continuity in security, analytics, and any other parameter-based operations across the entire media delivery workflow.
Show child attributes
Controls the option state.
Possible values:
The forward_from_files_types field specifies the types of playlist files from which parameters will be extracted and forwarded.
This typically includes formats that list multiple media chunk references, such as HLS and DASH playlists.
Parameters associated with these playlist files (like query strings or headers) will be propagated to the chunks they reference.
The field specifies the types of media chunk files to which parameters, extracted from playlist files, will be forwarded. These refer to the actual segments of media content that are delivered to viewers. Ensuring the correct parameters are forwarded to these files is crucial for maintaining the integrity of the streaming session.
The forward_only_keys field allows for granular control over which specific parameters are forwarded from playlist files to media chunk files.
By specifying certain keys, only those parameters will be propagated, ensuring that only relevant information is passed along.
This is particularly useful for security and performance optimization, as it prevents unnecessary or sensitive data from being included in requests for media chunks.
The forward_except_keys field provides a mechanism to exclude specific parameters from being forwarded from playlist files to media chunk files.
By listing certain keys in this field, you can ensure that these parameters are omitted during the forwarding process.
This is particularly useful for preventing sensitive or irrelevant information from being included in requests for media chunks, thereby enhancing security and optimizing performance.
{
"enabled": true,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
"forward_only_keys": ["auth_token", "session_id"],
"forward_except_keys": ["debug_info"]
}Enables redirect from HTTP to HTTPS.
redirect_http_to_https and redirect_https_to_http options cannot be enabled simultaneously.
{ "enabled": true, "value": true }Enables redirect from HTTPS to HTTP.
redirect_http_to_https and redirect_https_to_http options cannot be enabled simultaneously.
{ "enabled": false, "value": true }Controls access to the CDN resource content for specified domain names.
Show child attributes
Controls the option state.
Possible values:
Policy type.
Possible values:
excepted_values field.excepted_values field.allow, deny List of domain names or wildcard domains (without protocol: http:// or https://.)
The meaning of the parameter depends on policy_type value:
Examples:
example.com*.example.com600255{
"enabled": true,
"policy_type": "deny",
"excepted_values": ["example.com", "*.example.net"]
}Option allows to limit the amount of HTTP requests.
Show child attributes
Controls the option state.
Possible values:
Maximum request rate.
x >= 1Units of measurement for the rate field.
Possible values:
If the rate is less than one request per second, it is specified in request per minute (r/m.)
r/s, r/m {
"enabled": true,
"rate_unit": "r/s",
"rate": 5,
"burst": 5,
"delay": 0
}Hides HTTP headers from an origin server in the CDN response.
Show child attributes
Controls the option state.
Possible values:
How HTTP headers are hidden from the response.
Possible values:
excepted field.hide, show List of HTTP headers.
Parameter meaning depends on the value of the mode field:
The following headers are required and cannot be hidden from response:
ConnectionContent-LengthContent-TypeDateServer256128{
"enabled": true,
"mode": "hide",
"excepted": ["my-header"]
}Changes and redirects requests from the CDN to the origin. It operates according to the Nginx configuration.
Show child attributes
Controls the option state.
Possible values:
Path for the Rewrite option.
Example:
/(.*) /media/$1255Flag for the Rewrite option.
Possible values:
ngx_http_rewrite_module directives and start a search for a new location matching changed URI.http://, https://, or $scheme.break, last, redirect, permanent {
"enabled": true,
"body": "/(.*) /additional_path/$1",
"flag": "break"
}Configures access with tokenized URLs. This makes impossible to access content without a valid (unexpired) token.
Show child attributes
Controls the option state.
Possible values:
Key generated on your side that will be used for URL signing.
255Type of URL signing.
Possible types:
0, 2 {
"enabled": true,
"key": "secretkey",
"type": 2
}Requests and caches files larger than 10 MB in parts (no larger than 10 MB per part.) This reduces time to first byte.
The option is based on the Slice module.
Notes:
gzipON, brotli_compression or fetch_compressed options enabled.{ "enabled": true, "value": true }The hostname that is added to SNI requests from CDN servers to the origin server via HTTPS.
SNI is generally only required if your origin uses shared hosting or does not have a dedicated IP address. If the origin server presents multiple certificates, SNI allows the origin server to know which certificate to use for the connection.
The option works only if originProtocol parameter is HTTPS or MATCH.
Show child attributes
Controls the option state.
Possible values:
Custom SNI hostname.
It is required if sni_type is set to custom.
255SNI (Server Name Indication) type.
Possible values:
hostHeader and forward_host_header options.
It has several possible combinations:hostHeader option is enabled and specified, SNI hostname matches the Host header.forward_host_header option is enabled and has true value, SNI hostname matches the Host header used in the request made to a CDN.hostHeader and forward_host_header options are disabled, SNI hostname matches the primary CNAME.dynamic, custom {
"enabled": true,
"sni_type": "custom",
"custom_hostname": "custom.example.com"
}Serves stale cached content in case of origin unavailability.
Show child attributes
Controls the option state.
Possible values:
Defines list of errors for which "Always online" option is applied.
error, http_403, http_404, http_429, http_500, http_502, http_503, http_504, invalid_header, timeout, updating {
"enabled": true,
"value": ["http_404", "http_500"]
}Custom HTTP Headers that a CDN server adds to a response.
Show child attributes
Controls the option state.
Possible values:
50Show child attributes
HTTP Header name.
Restrictions:
128Header value.
Restrictions:
Defines whether the header will be added to a response from CDN regardless of response code.
Possible values:
{
"enabled": true,
"value": [
{
"name": "X-Example",
"value": ["Value_1"],
"always": true
},
{
"name": "X-Example-Multiple",
"value": ["Value_1", "Value_2", "Value_3"],
"always": false
}
]
}Legacy option. Use the static_response_headers option instead.
Custom HTTP Headers that a CDN server adds to response. Up to fifty custom HTTP Headers can be specified. May contain a header with multiple values.
Show child attributes
Controls the option state.
Possible values:
A MAP for static headers in a format of header_name: header_value.
Restrictions:
{
"enabled": true,
"value": {
"X-Example": "Value_1",
"X-Example-Multiple": ["Value_2", "Value_3"]
}
}Custom HTTP Headers for a CDN server to add to request. Up to fifty custom HTTP Headers can be specified.
Show child attributes
Controls the option state.
Possible values:
A MAP for static headers in a format of header_name: header_value.
Restrictions:
Show child attributes
{
"enabled": true,
"value": {
"Header-One": "Value 1",
"Header-Two": "Value 2"
}
}Controls access to the content for specified User-Agents.
Show child attributes
Controls the option state.
Possible values:
User-Agents policy type.
Possible values:
excepted_values field.excepted_values field.allow, deny List of User-Agents that will be allowed/denied.
The meaning of the parameter depends on policy_type:
Use an empty string "" to allow/deny access when the User-Agent header is empty.
600255{
"enabled": true,
"policy_type": "allow",
"excepted_values": ["UserAgent Value", ""]
}Allows to enable WAAP (Web Application and API Protection).
{ "enabled": true, "value": true }Enables or disables WebSockets connections to an origin server.
{ "enabled": true, "value": true }Was this page helpful?