---
title: "Get rules list"
method: GET
path: "/cdn/resources/{resource_id}/rules"
tags: ["Rules"]
---

# Get rules list

`GET /cdn/resources/{resource_id}/rules`

## Path parameters

- `resource_id` integer, required

## Query parameters

- `limit` integer
- `offset` integer

## Response `200`

Successful.

- union
  - RuleResponse[]
    - `id` integer — Rule ID.
    - `name` string — Rule name.
    - `active` boolean — Enables or disables a rule. Possible values: - **true** - Rule is active, rule settings are applied. - **false** - Rule is inactive, rule settings are not applied.
    - `deleted` boolean — Defines whether the rule has been deleted. Possible values: - **true** - Rule has been deleted. - **false** - Rule has not been deleted.
    - `originGroup` integer, nullable — 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.
    - `rule` string — 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.
    - `ruleType` integer — Rule type. Possible values: - **Type 0** - Regular expression. Must start with '^/' or '/'. - **Type 1** - Regular expression. Note that for this rule type we automatically add / to each rule pattern before your regular expression. This type is **legacy**, please use Type 0.
    - `weight` integer — 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.
    - `originProtocol` 'HTTPS' | 'HTTP' | 'MATCH' — Protocol used by CDN servers to request content from an origin source. Possible values: - **HTTPS** - CDN servers connect to origin via HTTPS protocol. - **HTTP** - CDN servers connect to origin via HTTP protocol. - **MATCH** - Connection protocol is chosen automatically; in this case, content on origin source should be available for the CDN both through HTTP and HTTPS protocols.
    - `overrideOriginProtocol` 'HTTPS' | 'HTTP' | 'MATCH', nullable — Sets a protocol other than the one specified in the CDN resource settings to connect to the origin. Possible values: - **HTTPS** - CDN servers connect to origin via HTTPS protocol. - **HTTP** - CDN servers connect to origin via HTTP protocol. - **MATCH** - Connection protocol is chosen automatically; in this case, content on origin source should be available for the CDN both through HTTP and HTTPS protocols. - **null** - `originProtocol` setting is inherited from the CDN resource settings.
    - `preset_applied` boolean — Defines whether the rule has an applied preset. Possible values: - **true** - Rule has a preset applied. - **false** - Rule does not have a preset applied. If a preset is applied to the rule, the options included in the preset cannot be edited for the rule.
    - `primary_rule` integer, nullable — ID of the rule with which the current rule is synchronized within the CDN resource shared cache zone feature.
    - `options` RuleOptions — 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.
      - `allowedHttpMethods` AllowedHttpMethods, nullable — HTTP methods allowed for content requests from the CDN.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string[], required
      - `brotli_compression` BrotliCompression, nullable — Compresses content with Brotli on the CDN side. CDN servers will request only uncompressed content from the origin. Notes: 1. CDN only supports "Brotli compression" when the "origin shielding" feature is activated. 2. If a precache server is not active for a CDN resource, no compression occurs, even if the option is enabled. 3. `brotli_compression` is not supported with `fetch_compressed` or `slice` options enabled. 4. `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.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string[], required — Allows to select the content types you want to compress. `text/html` is a mandatory content type.
      - `browser_cache_settings` BrowserCacheSettings, nullable — 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.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string, nginx time, required — Set the cache expiration time to '0s' to disable caching. The maximum duration is any equivalent to `1y`.
      - `cache_http_headers` CacheHttpHeaders, nullable — **Legacy option**. Use the `response_headers_hiding_policy` option instead. HTTP Headers that must be included in the response.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string[], required
      - `cors` Cors, nullable — 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.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string[], required — Value of the Access-Control-Allow-Origin header. Possible values: - **Adds * as the Access-Control-Allow-Origin header value** - Content will be uploaded for requests from any domain. `"value": ["*"]` - **Adds "$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"]` - **Adds "$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"]`
        - `always` boolean — Defines whether the Access-Control-Allow-Origin header should be added to a response from CDN regardless of response code. Possible values: - **true** - Header will be added to a response regardless of response code. - **false** - Header will only be added to responses with codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.
      - `country_acl` CountryAcl, nullable — Enables control access to content for specified countries.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `policy_type` 'allow' | 'deny', required — Defines the type of CDN resource access policy. Possible values: - **allow** - Access is allowed for all the countries except for those specified in `excepted_values` field. - **deny** - Access is denied for all the countries except for those specified in `excepted_values` field.
        - `excepted_values` string[], required — List of countries according to ISO-3166-1. The meaning of the parameter depends on `policy_type` value: - **allow** - List of countries for which access is prohibited. - **deny** - List of countries for which access is allowed.
      - `disable_cache` DisableCache, nullable — **Legacy option**. Use the `edge_cache_settings` option instead. Allows the complete disabling of content caching.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - content caching is disabled. - **false** - content caching is enabled.
      - `disable_proxy_force_ranges` DisableProxyForceRanges, nullable — Allows 206 responses regardless of the settings of an origin source.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `edge_cache_settings` EdgeCacheSettings, nullable — Cache expiration time for CDN servers. `value` and `default` fields cannot be used simultaneously.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string, nginx time — 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`.
        - `custom_values` object — 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. - Use `any` key to specify caching time for all response codes. - Use `0s` value to disable caching for a specific response code.
        - `default` string, nginx time — 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`.
      - `fastedge` Fastedge, nullable — 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.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `on_request_headers` object — Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
          - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
          - `app_id` string, required — The ID of the application in FastEdge.
          - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
          - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
          - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
        - `on_request_body` object — Allows to configure FastEdge application that will be called to handle request body as soon as CDN receives incoming HTTP request.
          - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
          - `app_id` string, required — The ID of the application in FastEdge.
          - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
          - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
          - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
        - `on_response_headers` object — Allows to configure FastEdge application that will be called to handle response headers before CDN sends the HTTP response.
          - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
          - `app_id` string, required — The ID of the application in FastEdge.
          - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
          - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
          - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
        - `on_response_body` object — Allows to configure FastEdge application that will be called to handle response body before CDN sends the HTTP response.
          - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
          - `app_id` string, required — The ID of the application in FastEdge.
          - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
          - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
          - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
      - `fetch_compressed` FetchCompressed, nullable — 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: 1. `fetch_compressed` is not supported with `gzipON` or `brotli_compression` or `slice` options enabled. 2. `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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `follow_origin_redirect` FollowOriginRedirect, nullable — 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.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `codes` integer[], required — 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.
      - `force_return` ForceReturn, nullable — 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.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `code` integer, required — Status code value.
        - `body` string, required — URL for redirection or text.
        - `time_interval` object, nullable — Controls the time at which a custom HTTP response code should be applied. By default, a custom HTTP response code is applied at any time.
          - `start_time` string, required — Time from which a custom HTTP response code should be applied. Indicated in 24-hour format.
          - `end_time` string, required — Time until which a custom HTTP response code should be applied. Indicated in 24-hour format.
          - `time_zone` string, timezone — Time zone used to calculate time.
      - `forward_host_header` ForwardHostHeader, nullable — Forwards the Host header from a end-user request to an origin server. `hostHeader` and `forward_host_header` options cannot be enabled simultaneously.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `gzipOn` GzipOn, nullable — Compresses content with gzip on the CDN end. CDN servers will request only uncompressed content from the origin. Notes: 1. Compression with gzip is not supported with `fetch_compressed` or `slice` options enabled. 2. `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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `hostHeader` HostHeader, nullable — 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string, required — Host Header value.
      - `ignore_cookie` IgnoreCookie, nullable — Defines whether the files with the Set-Cookies header are cached as one file or as different ones.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled, files with cookies are cached as one file. - **false** - Option is disabled, files with cookies are cached as different files.
      - `ignoreQueryString` IgnoreQueryString, nullable — 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `image_stack` ImageStack, nullable — Transforms JPG and PNG images (for example, resize or crop) and automatically converts them to WebP or AVIF format.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `avif_enabled` boolean — Enables or disables automatic conversion of JPEG and PNG images to AVI format.
        - `webp_enabled` boolean — Enables or disables automatic conversion of JPEG and PNG images to WebP format.
        - `quality` integer — 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.
        - `png_lossless` boolean — Enables or disables compression without quality loss for PNG format.
      - `ip_address_acl` IpAddressAcl, nullable — 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.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses)
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `policy_type` 'allow' | 'deny', required — IP access policy type. Possible values: - **allow** - Allow access to all IPs except IPs specified in "excepted_values" field. - **deny** - Deny access to all IPs except IPs specified in "excepted_values" field.
        - `excepted_values` string[], required — List of IP addresses with a subnet mask. The meaning of the parameter depends on `policy_type` value: - **allow** - List of IP addresses for which access is prohibited. - **deny** - List of IP addresses for which access is allowed. Examples: - `192.168.3.2/32` - `2a03:d000:2980:7::8/128`
      - `limit_bandwidth` LimitBandwidth, nullable — Allows to control the download speed per connection.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `limit_type` 'static' | 'dynamic', required — Method of controlling the download speed per connection. Possible values: - **static** - Use speed and buffer fields to set the download speed limit. - **dynamic** - Use query strings **speed** and **buffer** to set the download speed limit. For example, when requesting content at the link ``` http://cdn.example.com/video.mp4?speed=50k&buffer=500k ``` the download speed will be limited to 50kB/s after 500 kB.
        - `speed` integer — Maximum download speed per connection.
        - `buffer` integer — Amount of downloaded data after which the user will be rate limited.
      - `proxy_cache_key` ProxyCacheKey, nullable — 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_uri`** - **$scheme** - **$uri** **Warning**: 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string, required — Key for caching.
      - `proxy_cache_methods_set` ProxyCacheMethodsSet, nullable — Caching for POST requests along with default GET and HEAD.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `proxy_connect_timeout` ProxyConnectTimeout, nullable — The time limit for establishing a connection with the origin.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string, required — Timeout value in seconds. Supported range: **1s - 5s**.
      - `proxy_read_timeout` ProxyReadTimeout, nullable — 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string, required — Timeout value in seconds. Supported range: **1s - 30s**.
      - `query_params_blacklist` QueryParamsBlacklist, nullable — 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string[], required — List of query parameters.
      - `query_params_whitelist` QueryParamsWhitelist, nullable — 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string[], required — List of query parameters.
      - `query_string_forwarding` QueryStringForwarding, nullable — 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.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `forward_from_file_types` string[], required — 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.
        - `forward_to_file_types` string[], required — 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.
        - `forward_only_keys` string[] — 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.
        - `forward_except_keys` string[] — 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.
      - `redirect_http_to_https` RedirectHttpToHttps, nullable — Enables redirect from HTTP to HTTPS. `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled simultaneously.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `redirect_https_to_http` RedirectHttpsToHttp, nullable — Enables redirect from HTTPS to HTTP. `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled simultaneously.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `referrer_acl` ReferrerAcl, nullable — Controls access to the CDN resource content for specified domain names.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `policy_type` 'allow' | 'deny', required — Policy type. Possible values: - **allow** - Allow access to all domain names except the domain names specified in `excepted_values` field. - **deny** - Deny access to all domain names except the domain names specified in `excepted_values` field.
        - `excepted_values` string[], required — List of domain names or wildcard domains (without protocol: `http://` or `https://`.) The meaning of the parameter depends on `policy_type` value: - **allow** - List of domain names for which access is prohibited. - **deny** - List of IP domain names for which access is allowed. Examples: - `example.com` - `*.example.com`
      - `response_headers_hiding_policy` ResponseHeadersHidingPolicy, nullable — Hides HTTP headers from an origin server in the CDN response.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `mode` 'hide' | 'show', required — How HTTP headers are hidden from the response. Possible values: - **show** - Hide only HTTP headers listed in the `excepted` field. - **hide** - Hide all HTTP headers except headers listed in the "excepted" field.
        - `excepted` string[], required — List of HTTP headers. Parameter meaning depends on the value of the `mode` field: - **show** - List of HTTP headers to hide from response. - **hide** - List of HTTP headers to include in response. Other HTTP headers will be hidden. The following headers are required and cannot be hidden from response: - `Connection` - `Content-Length` - `Content-Type` - `Date` - `Server`
      - `rewrite` Rewrite, nullable — Changes and redirects requests from the CDN to the origin. It operates according to the [Nginx](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite) configuration.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `flag` 'break' | 'last' | 'redirect' | 'permanent' — Flag for the Rewrite option. Possible values: - **last** - Stop processing the current set of `ngx_http_rewrite_module` directives and start a search for a new location matching changed URI. - **break** - Stop processing the current set of the Rewrite option. - **redirect** - Return a temporary redirect with the 302 code; used when a replacement string does not start with `http://`, `https://`, or `$scheme`. - **permanent** - Return a permanent redirect with the 301 code.
        - `body` string, required — Path for the Rewrite option. Example: - `/(.*) /media/$1`
      - `secure_key` SecureKey, nullable — Configures access with tokenized URLs. This makes impossible to access content without a valid (unexpired) token.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `key` string, nullable, required — Key generated on your side that will be used for URL signing.
        - `type` 0 | 2 — Type of URL signing. Possible types: - **Type 0** - Includes end user IP to secure token generation. - **Type 2** - Excludes end user IP from secure token generation.
      - `slice` Slice, nullable — 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](https://nginx.org/en/docs/http/ngx_http_slice_module.html) module. Notes: 1. Origin must support HTTP Range requests. 2. Not supported with `gzipON`, `brotli_compression` or `fetch_compressed` options enabled.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `sni` Sni, nullable — 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`.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `sni_type` 'dynamic' | 'custom' — SNI (Server Name Indication) type. Possible values: - **dynamic** - SNI hostname depends on `hostHeader` and `forward_host_header` options. It has several possible combinations: - If the `hostHeader` option is enabled and specified, SNI hostname matches the Host header. - If the `forward_host_header` option is enabled and has true value, SNI hostname matches the Host header used in the request made to a CDN. - If the `hostHeader` and `forward_host_header` options are disabled, SNI hostname matches the primary CNAME. - **custom** - custom SNI hostname is in use.
        - `custom_hostname` string, domain, required — Custom SNI hostname. It is required if `sni_type` is set to custom.
      - `stale` Stale, nullable — Serves stale cached content in case of origin unavailability.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` string[], required — Defines list of errors for which "Always online" option is applied.
      - `static_response_headers` StaticResponseHeaders, nullable — Custom HTTP Headers that a CDN server adds to a response.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` object[], required
          - `name` string, required — HTTP Header name. Restrictions: - Maximum 128 symbols. - Latin letters (A-Z, a-z,) numbers (0-9,) dashes, and underscores only.
          - `value` string[], required — Header value. Restrictions: - Maximum 512 symbols. - Letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). - Must start with a letter, number, asterisk or {. - Multiple values can be added.
          - `always` boolean — Defines whether the header will be added to a response from CDN regardless of response code. Possible values: - **true** - Header will be added to a response from CDN regardless of response code. - **false** - Header will be added only to the following response codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.
      - `staticHeaders` StaticHeaders, nullable — **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.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` object, required — A MAP for static headers in a format of `header_name: header_value`. Restrictions: - **Header name** - Maximum 128 symbols, may contain Latin letters (A-Z, a-z), numbers (0-9), dashes, and underscores. - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). Must start with a letter, number, asterisk or {.
      - `staticRequestHeaders` StaticRequestHeaders, nullable — Custom HTTP Headers for a CDN server to add to request. Up to fifty custom HTTP Headers can be specified.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` object, required — A MAP for static headers in a format of `header_name: header_value`. Restrictions: - **Header name** - Maximum 255 symbols, may contain Latin letters (A-Z, a-z), numbers (0-9), dashes, and underscores. - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). Must start with a letter, number, asterisk or {.
      - `user_agent_acl` UserAgentAcl, nullable — Controls access to the content for specified User-Agents.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `policy_type` 'allow' | 'deny', required — User-Agents policy type. Possible values: - **allow** - Allow access for all User-Agents except specified in `excepted_values` field. - **deny** - Deny access for all User-Agents except specified in `excepted_values` field.
        - `excepted_values` string[], required — List of User-Agents that will be allowed/denied. The meaning of the parameter depends on `policy_type`: - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. You can provide exact User-Agent strings or regular expressions. Regular expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). Use an empty string `""` to allow/deny access when the User-Agent header is empty.
      - `waap` Waap, nullable — Allows to enable WAAP (Web Application and API Protection).
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
      - `websockets` Websockets, nullable — Enables or disables WebSockets connections to an origin server.
        - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
  - object
    - `count` integer, required — Total number of items.
    - `next` string, nullable, required — URL to the next page of results. Null if current page is the last one.
    - `previous` string, nullable, required — URL to the previous page of results. Null if current page is the first one.
    - `results` RuleResponse[], required — List of items on the current page.
      - `id` integer — Rule ID.
      - `name` string — Rule name.
      - `active` boolean — Enables or disables a rule. Possible values: - **true** - Rule is active, rule settings are applied. - **false** - Rule is inactive, rule settings are not applied.
      - `deleted` boolean — Defines whether the rule has been deleted. Possible values: - **true** - Rule has been deleted. - **false** - Rule has not been deleted.
      - `originGroup` integer, nullable — 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.
      - `rule` string — 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.
      - `ruleType` integer — Rule type. Possible values: - **Type 0** - Regular expression. Must start with '^/' or '/'. - **Type 1** - Regular expression. Note that for this rule type we automatically add / to each rule pattern before your regular expression. This type is **legacy**, please use Type 0.
      - `weight` integer — 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.
      - `originProtocol` 'HTTPS' | 'HTTP' | 'MATCH' — Protocol used by CDN servers to request content from an origin source. Possible values: - **HTTPS** - CDN servers connect to origin via HTTPS protocol. - **HTTP** - CDN servers connect to origin via HTTP protocol. - **MATCH** - Connection protocol is chosen automatically; in this case, content on origin source should be available for the CDN both through HTTP and HTTPS protocols.
      - `overrideOriginProtocol` 'HTTPS' | 'HTTP' | 'MATCH', nullable — Sets a protocol other than the one specified in the CDN resource settings to connect to the origin. Possible values: - **HTTPS** - CDN servers connect to origin via HTTPS protocol. - **HTTP** - CDN servers connect to origin via HTTP protocol. - **MATCH** - Connection protocol is chosen automatically; in this case, content on origin source should be available for the CDN both through HTTP and HTTPS protocols. - **null** - `originProtocol` setting is inherited from the CDN resource settings.
      - `preset_applied` boolean — Defines whether the rule has an applied preset. Possible values: - **true** - Rule has a preset applied. - **false** - Rule does not have a preset applied. If a preset is applied to the rule, the options included in the preset cannot be edited for the rule.
      - `primary_rule` integer, nullable — ID of the rule with which the current rule is synchronized within the CDN resource shared cache zone feature.
      - `options` RuleOptions — 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.
        - `allowedHttpMethods` AllowedHttpMethods, nullable — HTTP methods allowed for content requests from the CDN.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string[], required
        - `brotli_compression` BrotliCompression, nullable — Compresses content with Brotli on the CDN side. CDN servers will request only uncompressed content from the origin. Notes: 1. CDN only supports "Brotli compression" when the "origin shielding" feature is activated. 2. If a precache server is not active for a CDN resource, no compression occurs, even if the option is enabled. 3. `brotli_compression` is not supported with `fetch_compressed` or `slice` options enabled. 4. `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.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string[], required — Allows to select the content types you want to compress. `text/html` is a mandatory content type.
        - `browser_cache_settings` BrowserCacheSettings, nullable — 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.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string, nginx time, required — Set the cache expiration time to '0s' to disable caching. The maximum duration is any equivalent to `1y`.
        - `cache_http_headers` CacheHttpHeaders, nullable — **Legacy option**. Use the `response_headers_hiding_policy` option instead. HTTP Headers that must be included in the response.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string[], required
        - `cors` Cors, nullable — 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.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string[], required — Value of the Access-Control-Allow-Origin header. Possible values: - **Adds * as the Access-Control-Allow-Origin header value** - Content will be uploaded for requests from any domain. `"value": ["*"]` - **Adds "$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"]` - **Adds "$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"]`
          - `always` boolean — Defines whether the Access-Control-Allow-Origin header should be added to a response from CDN regardless of response code. Possible values: - **true** - Header will be added to a response regardless of response code. - **false** - Header will only be added to responses with codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.
        - `country_acl` CountryAcl, nullable — Enables control access to content for specified countries.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `policy_type` 'allow' | 'deny', required — Defines the type of CDN resource access policy. Possible values: - **allow** - Access is allowed for all the countries except for those specified in `excepted_values` field. - **deny** - Access is denied for all the countries except for those specified in `excepted_values` field.
          - `excepted_values` string[], required — List of countries according to ISO-3166-1. The meaning of the parameter depends on `policy_type` value: - **allow** - List of countries for which access is prohibited. - **deny** - List of countries for which access is allowed.
        - `disable_cache` DisableCache, nullable — **Legacy option**. Use the `edge_cache_settings` option instead. Allows the complete disabling of content caching.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - content caching is disabled. - **false** - content caching is enabled.
        - `disable_proxy_force_ranges` DisableProxyForceRanges, nullable — Allows 206 responses regardless of the settings of an origin source.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `edge_cache_settings` EdgeCacheSettings, nullable — Cache expiration time for CDN servers. `value` and `default` fields cannot be used simultaneously.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string, nginx time — 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`.
          - `custom_values` object — 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. - Use `any` key to specify caching time for all response codes. - Use `0s` value to disable caching for a specific response code.
          - `default` string, nginx time — 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`.
        - `fastedge` Fastedge, nullable — 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.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `on_request_headers` object — Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
            - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
            - `app_id` string, required — The ID of the application in FastEdge.
            - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
            - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
            - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
          - `on_request_body` object — Allows to configure FastEdge application that will be called to handle request body as soon as CDN receives incoming HTTP request.
            - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
            - `app_id` string, required — The ID of the application in FastEdge.
            - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
            - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
            - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
          - `on_response_headers` object — Allows to configure FastEdge application that will be called to handle response headers before CDN sends the HTTP response.
            - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
            - `app_id` string, required — The ID of the application in FastEdge.
            - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
            - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
            - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
          - `on_response_body` object — Allows to configure FastEdge application that will be called to handle response body before CDN sends the HTTP response.
            - `enabled` boolean — Determines if the FastEdge application should be called whenever HTTP request headers are received.
            - `app_id` string, required — The ID of the application in FastEdge.
            - `interrupt_on_error` boolean — Determines if the request execution should be interrupted when an error occurs.
            - `execute_on_edge` boolean — Determines if the request should be executed at the edge nodes.
            - `execute_on_shield` boolean — Determines if the request should be executed at the shield nodes.
        - `fetch_compressed` FetchCompressed, nullable — 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: 1. `fetch_compressed` is not supported with `gzipON` or `brotli_compression` or `slice` options enabled. 2. `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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `follow_origin_redirect` FollowOriginRedirect, nullable — 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.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `codes` integer[], required — 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.
        - `force_return` ForceReturn, nullable — 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.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `code` integer, required — Status code value.
          - `body` string, required — URL for redirection or text.
          - `time_interval` object, nullable — Controls the time at which a custom HTTP response code should be applied. By default, a custom HTTP response code is applied at any time.
            - `start_time` string, required — Time from which a custom HTTP response code should be applied. Indicated in 24-hour format.
            - `end_time` string, required — Time until which a custom HTTP response code should be applied. Indicated in 24-hour format.
            - `time_zone` string, timezone — Time zone used to calculate time.
        - `forward_host_header` ForwardHostHeader, nullable — Forwards the Host header from a end-user request to an origin server. `hostHeader` and `forward_host_header` options cannot be enabled simultaneously.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `gzipOn` GzipOn, nullable — Compresses content with gzip on the CDN end. CDN servers will request only uncompressed content from the origin. Notes: 1. Compression with gzip is not supported with `fetch_compressed` or `slice` options enabled. 2. `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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `hostHeader` HostHeader, nullable — 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string, required — Host Header value.
        - `ignore_cookie` IgnoreCookie, nullable — Defines whether the files with the Set-Cookies header are cached as one file or as different ones.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled, files with cookies are cached as one file. - **false** - Option is disabled, files with cookies are cached as different files.
        - `ignoreQueryString` IgnoreQueryString, nullable — 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `image_stack` ImageStack, nullable — Transforms JPG and PNG images (for example, resize or crop) and automatically converts them to WebP or AVIF format.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `avif_enabled` boolean — Enables or disables automatic conversion of JPEG and PNG images to AVI format.
          - `webp_enabled` boolean — Enables or disables automatic conversion of JPEG and PNG images to WebP format.
          - `quality` integer — 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.
          - `png_lossless` boolean — Enables or disables compression without quality loss for PNG format.
        - `ip_address_acl` IpAddressAcl, nullable — 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.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses)
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `policy_type` 'allow' | 'deny', required — IP access policy type. Possible values: - **allow** - Allow access to all IPs except IPs specified in "excepted_values" field. - **deny** - Deny access to all IPs except IPs specified in "excepted_values" field.
          - `excepted_values` string[], required — List of IP addresses with a subnet mask. The meaning of the parameter depends on `policy_type` value: - **allow** - List of IP addresses for which access is prohibited. - **deny** - List of IP addresses for which access is allowed. Examples: - `192.168.3.2/32` - `2a03:d000:2980:7::8/128`
        - `limit_bandwidth` LimitBandwidth, nullable — Allows to control the download speed per connection.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `limit_type` 'static' | 'dynamic', required — Method of controlling the download speed per connection. Possible values: - **static** - Use speed and buffer fields to set the download speed limit. - **dynamic** - Use query strings **speed** and **buffer** to set the download speed limit. For example, when requesting content at the link ``` http://cdn.example.com/video.mp4?speed=50k&buffer=500k ``` the download speed will be limited to 50kB/s after 500 kB.
          - `speed` integer — Maximum download speed per connection.
          - `buffer` integer — Amount of downloaded data after which the user will be rate limited.
        - `proxy_cache_key` ProxyCacheKey, nullable — 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_uri`** - **$scheme** - **$uri** **Warning**: 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string, required — Key for caching.
        - `proxy_cache_methods_set` ProxyCacheMethodsSet, nullable — Caching for POST requests along with default GET and HEAD.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `proxy_connect_timeout` ProxyConnectTimeout, nullable — The time limit for establishing a connection with the origin.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string, required — Timeout value in seconds. Supported range: **1s - 5s**.
        - `proxy_read_timeout` ProxyReadTimeout, nullable — 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string, required — Timeout value in seconds. Supported range: **1s - 30s**.
        - `query_params_blacklist` QueryParamsBlacklist, nullable — 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string[], required — List of query parameters.
        - `query_params_whitelist` QueryParamsWhitelist, nullable — 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` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string[], required — List of query parameters.
        - `query_string_forwarding` QueryStringForwarding, nullable — 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.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `forward_from_file_types` string[], required — 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.
          - `forward_to_file_types` string[], required — 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.
          - `forward_only_keys` string[] — 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.
          - `forward_except_keys` string[] — 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.
        - `redirect_http_to_https` RedirectHttpToHttps, nullable — Enables redirect from HTTP to HTTPS. `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled simultaneously.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `redirect_https_to_http` RedirectHttpsToHttp, nullable — Enables redirect from HTTPS to HTTP. `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled simultaneously.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `referrer_acl` ReferrerAcl, nullable — Controls access to the CDN resource content for specified domain names.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `policy_type` 'allow' | 'deny', required — Policy type. Possible values: - **allow** - Allow access to all domain names except the domain names specified in `excepted_values` field. - **deny** - Deny access to all domain names except the domain names specified in `excepted_values` field.
          - `excepted_values` string[], required — List of domain names or wildcard domains (without protocol: `http://` or `https://`.) The meaning of the parameter depends on `policy_type` value: - **allow** - List of domain names for which access is prohibited. - **deny** - List of IP domain names for which access is allowed. Examples: - `example.com` - `*.example.com`
        - `response_headers_hiding_policy` ResponseHeadersHidingPolicy, nullable — Hides HTTP headers from an origin server in the CDN response.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `mode` 'hide' | 'show', required — How HTTP headers are hidden from the response. Possible values: - **show** - Hide only HTTP headers listed in the `excepted` field. - **hide** - Hide all HTTP headers except headers listed in the "excepted" field.
          - `excepted` string[], required — List of HTTP headers. Parameter meaning depends on the value of the `mode` field: - **show** - List of HTTP headers to hide from response. - **hide** - List of HTTP headers to include in response. Other HTTP headers will be hidden. The following headers are required and cannot be hidden from response: - `Connection` - `Content-Length` - `Content-Type` - `Date` - `Server`
        - `rewrite` Rewrite, nullable — Changes and redirects requests from the CDN to the origin. It operates according to the [Nginx](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite) configuration.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `flag` 'break' | 'last' | 'redirect' | 'permanent' — Flag for the Rewrite option. Possible values: - **last** - Stop processing the current set of `ngx_http_rewrite_module` directives and start a search for a new location matching changed URI. - **break** - Stop processing the current set of the Rewrite option. - **redirect** - Return a temporary redirect with the 302 code; used when a replacement string does not start with `http://`, `https://`, or `$scheme`. - **permanent** - Return a permanent redirect with the 301 code.
          - `body` string, required — Path for the Rewrite option. Example: - `/(.*) /media/$1`
        - `secure_key` SecureKey, nullable — Configures access with tokenized URLs. This makes impossible to access content without a valid (unexpired) token.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `key` string, nullable, required — Key generated on your side that will be used for URL signing.
          - `type` 0 | 2 — Type of URL signing. Possible types: - **Type 0** - Includes end user IP to secure token generation. - **Type 2** - Excludes end user IP from secure token generation.
        - `slice` Slice, nullable — 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](https://nginx.org/en/docs/http/ngx_http_slice_module.html) module. Notes: 1. Origin must support HTTP Range requests. 2. Not supported with `gzipON`, `brotli_compression` or `fetch_compressed` options enabled.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `sni` Sni, nullable — 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`.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `sni_type` 'dynamic' | 'custom' — SNI (Server Name Indication) type. Possible values: - **dynamic** - SNI hostname depends on `hostHeader` and `forward_host_header` options. It has several possible combinations: - If the `hostHeader` option is enabled and specified, SNI hostname matches the Host header. - If the `forward_host_header` option is enabled and has true value, SNI hostname matches the Host header used in the request made to a CDN. - If the `hostHeader` and `forward_host_header` options are disabled, SNI hostname matches the primary CNAME. - **custom** - custom SNI hostname is in use.
          - `custom_hostname` string, domain, required — Custom SNI hostname. It is required if `sni_type` is set to custom.
        - `stale` Stale, nullable — Serves stale cached content in case of origin unavailability.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` string[], required — Defines list of errors for which "Always online" option is applied.
        - `static_response_headers` StaticResponseHeaders, nullable — Custom HTTP Headers that a CDN server adds to a response.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` object[], required
            - `name` string, required — HTTP Header name. Restrictions: - Maximum 128 symbols. - Latin letters (A-Z, a-z,) numbers (0-9,) dashes, and underscores only.
            - `value` string[], required — Header value. Restrictions: - Maximum 512 symbols. - Letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). - Must start with a letter, number, asterisk or {. - Multiple values can be added.
            - `always` boolean — Defines whether the header will be added to a response from CDN regardless of response code. Possible values: - **true** - Header will be added to a response from CDN regardless of response code. - **false** - Header will be added only to the following response codes: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308.
        - `staticHeaders` StaticHeaders, nullable — **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.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` object, required — A MAP for static headers in a format of `header_name: header_value`. Restrictions: - **Header name** - Maximum 128 symbols, may contain Latin letters (A-Z, a-z), numbers (0-9), dashes, and underscores. - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). Must start with a letter, number, asterisk or {.
        - `staticRequestHeaders` StaticRequestHeaders, nullable — Custom HTTP Headers for a CDN server to add to request. Up to fifty custom HTTP Headers can be specified.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` object, required — A MAP for static headers in a format of `header_name: header_value`. Restrictions: - **Header name** - Maximum 255 symbols, may contain Latin letters (A-Z, a-z), numbers (0-9), dashes, and underscores. - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&*()-_=+ /|\";:?.,><{}[]). Must start with a letter, number, asterisk or {.
        - `user_agent_acl` UserAgentAcl, nullable — Controls access to the content for specified User-Agents.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `policy_type` 'allow' | 'deny', required — User-Agents policy type. Possible values: - **allow** - Allow access for all User-Agents except specified in `excepted_values` field. - **deny** - Deny access for all User-Agents except specified in `excepted_values` field.
          - `excepted_values` string[], required — List of User-Agents that will be allowed/denied. The meaning of the parameter depends on `policy_type`: - **allow** - List of User-Agents for which access is prohibited. - **deny** - List of User-Agents for which access is allowed. You can provide exact User-Agent strings or regular expressions. Regular expressions must start with `~` (case-sensitive) or `~*` (case-insensitive). Use an empty string `""` to allow/deny access when the User-Agent header is empty.
        - `waap` Waap, nullable — Allows to enable WAAP (Web Application and API Protection).
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
        - `websockets` Websockets, nullable — Enables or disables WebSockets connections to an origin server.
          - `enabled` boolean, required — Controls the option state. Possible values: - **true** - Option is enabled. - **false** - Option is disabled.
          - `value` boolean, required — Possible values: - **true** - Option is enabled. - **false** - Option is disabled.

---

[API](https://skmtc.net/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.net/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/versions/09e652815095/schema)
