How It Works?

최신 업데이트:2026-07-24 11:15:54

How does Serverless CDN Pro Edge Cloud work?

CDN Pro Edge Cloud run time code uses Open-source NGINX scripting language. It supports a standard set of NGINX directives and advanced CDN Pro proprietary directives. CDN Pro portal facilitates an IDE programming interface, Edge Logic, for you to program and control traffic delivery, such as modifying requests, responses, cache control, content redirect and modification, HTTP header, and back-to-origin path manipulation.

To get started, just log in to the CDN Pro portal, create a new property for your application or edit an existing property, and configure in the Edge Logic editor on the portal. It’s just that simple!

The following snippet of Edge Logic code allows you to get an understanding of CDN Pro programming. When performing bot management, you might want to make sure the request is made by a human using a browser instead of by a bot or crawler before the content is delivered to fulfill a request. The following Edge Logic code achieves this purpose by prompting end-users to click a button to receive the requested content:

location /protected/ {
    if ($cookie_validated = '') { #check the existence of the cookie 'validated'
        add_header Set-Cookie 'validated=1; Max-Age=60';
        add_header Content-Type 'text/html' policy=overwrite;
        return 200 '<!DOCTYPE html>
<html>
  <script>
    alert("Human, click OK to proceed.");
    location.href="$request_uri";
  </script>
</html>';
    }
    # continue loading the page from origin or cache
    origin_pass my_origin;
}

Once deployed to CDN Pro production, the code is scaled instantly in the edge locations around the globe. If an HTTP(S) request from an end-user for your configured property is received by the CDN Pro platform, your code is executed and runs in the edge location closest to the end-user. Since your program code is unconstrained by the limits of physical or virtual server structures, it scales instantly and is always available to your end-users.

이 문서의 내용이 도움이 되었습니까?
아니오
정상적으로 제출되었습니다.피드백을 주셔서 감사합니다.앞으로도 개선을 위해 노력하겠습니다.