Skip to main content

CDN Resource - Geo Blocking

This setting is available for all resource types.

Method

URL

PUT

https://cloud.medianova.com/api/v1/cdn/{organization_uuid}/resource/{resource_uuid}

Parameters

Description

Type

Required

organization_uuid

The created organization in Medianova Cloud Panel unit ID value. Path parameter.

String

Yes

resource_uuid

The created resource in Medianova Cloud Panel unit ID value. Path parameter.

String

Yes

default_rule_geo_blocking_status

It is the status information of the default defined rules for the geo blocking setting.

Boolean

Yes

status_geo_blocking

The values of the status_geo_blocking must be any of the; “true”, “false”.

Boolean

Yes

geo_blocking_details

Defines the parameters of the resource's geo blocking setting.

Object

Yes

geo_blocking_details.blacklist_countries

Defines the disallowed country information in the geo blocking setting of the resource. If geo_blocking_details.type is allow, blacklist_countries is required.

String

No

geo_blocking_details.pull_from_origin_header

It is the status information for geo blocking pull from origin header setting. The values of the pull_from_origin_header must be any of the; “true”, “false”.

Boolean

Yes

geo_blocking_details.type

Defines the type of resource's geo blocking setting. The values of the type must be any of the; “allow”, “disallow”.

String

Yes

geo_blocking_details.whitelist_countries

Defines the allowed country information in the geo blocking setting of the resource.

String

No

whitelist_ip

This parameter is used to allow system access for specific IP addresses. You can use this parameter to allow only certain IP addresses to access the system.

String

No

blacklist_ip

This parameter is used to block specific IP addresses. You can use this parameter to specify the IP addresses that are denied access to the system.

String

No

Payload 1

CODE
{
    "status_geo_blocking": true,
    "resource_uuid": "****-****-*****-****",
    "default_rule_geo_blocking_status": true,
    "geo_blocking_details": {
        "pull_from_origin_header": false,
        "type": "disallow",
        "whitelist_countries": [
            "AR"
        ],
        "blacklist_countries": [
            ""
        ],
        "whitelist_ip": [
            "1.2.3.4"
        ],
        "blacklist_ip": [
            ""
        ]
    }
}

Payload 2

CODE
{
    "status_geo_blocking": true,
    "resource_uuid": "****-****-****-****",
    "default_rule_geo_blocking_status": true,
    "geo_blocking_details": {
        "pull_from_origin_header": false,
        "type": "allow",
        "blacklist_countries": [
            "AU"
        ],
        "whitelist_countries": [
            ""
        ],
        "whitelist_ip": [
            ""
        ],
        "blacklist_ip": [
            "1.2.3.4"
        ]
    }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.