EdgeScript (ES) lets you write scripts to customize Alibaba Cloud CDN configurations when the standard options in the ApsaraVideo VOD console do not meet your business requirements.
With easy-to-learn syntax and a large library of functions, ES lets you customize Alibaba Cloud CDN features.
ES includes encapsulated functions, simple decision-making statements, and built-in variables that Alibaba Cloud CDN points of presence (POPs) can recognize. You can combine variables and functions to customize authentication, caching, throttling, and request headers for fast, flexible configuration updates.
-
For more information about variables, see EdgeScript built-in variables.
-
For more information about functions, see EdgeScript built-in functions.
-
For more information about conditional logic, see Logical functions.
Billing
ES is free of charge.
Use cases
Authentication logic — Prevent hotlinking in VOD and live streaming scenarios by authenticating requests based on parameters, cookies, or algorithms. Custom authentication logic reinforces protection for resources on your origin server.
Request and response headers — Modify request and response headers to match your business requirements.
URL rewriting and redirection — Redirect requests to language-specific URLs. For example, redirect requests requiring English or German content from the China site to the appropriate regional site.
A/B testing — Route requests with different headers or URLs to different origin servers to trigger different features before a full release.
Custom caching — Create caching rules when standard time-to-live (TTL) values or cache expiration rules don't fit your use case.
Request throttling — Apply per-user throttling rules, for example to differentiate between free and paying users.
Request blocking — Block requests from specific IP addresses, apply region-based filtering, or set anti-bot policies to protect your resources from bots.