Url parameters reference - Video CDN [EN]
URL parameters override your default settings for each url. Such usage is not mandatory, but it is important for content security and helps configure user interraction much more percisely.
We recommend defining global (or domain) settings where it is possible. Use specific url configuration only if they are really needed.
Usage
All the parameters are supported by default. They can be blocked with corresponding global (or domain) settings. But blocking has no practical sense if Url Signature is enabled: if the url parameters change, the signature becomes invalid, and user loses access to the file with the old url.
Format
Url parameters are written as pairs in the /name=value/``format. For example: ``http://example.org/parameter1=value1/parameter2=value2/path/to/file.mp4
In some cases browsers (or players in browsers) do not process the = combinations correctly. To accommodate these cases, symbol _ may be used as a separator instead.
But only one option is allowed at the same time. Do not mix them!
Parameters
key
This parameter relates to Url Signature.
Usage of /key=KEY_VALUE[,option1[,option2,..]/, e.g.:
http://cdn.domain.com/key=9CVHszhqqsA,end=1374068216/1/2/3.mp4This parameter contains url signature value. It verifies that the requested url was not changed after it was published on the site, maintaining the same path and delivery settings.
Signature is being generated by hashing a part of the url with the MD5 algorithm based on base64. You can get more information in this guide.
The whole part of the URL after KEY_VALUE is being signed (including all additional options of /key=../). For URL /key=KEY_VALUE,end=1701234567/speed=1.3/path/to/file.mp4, a string for signing will be ,end=17123123/speed=1.3/path/to/file.mp4.
All parameters to the left of /key=../ are ignored. In /speed=0/key=KEY_VALUE/path/to/file.mp4, the /speed=0/ value will be ignored.
Options (with their values) after KEY_VALUE may be written in arbitrary order.
Contact the support team to make a whitelist of addresses allowed to bypass this verification.
“begin” option
This option relates to Url TTL Protection
Usage of /key=KEY_VALUE,begin=123456789/, e.g.:
http://video.com/key=LePgDoTB7PDqCBQsRxa92w,begin=1987654321/output.mp4The option specifies the time when a signature becomes valid. Value must be a UNIX Timestamp.
“end” option
This option relates to Url TTL Protection
Usage of /key=KEY_VALUE,end=1701234567/, e.g.:
http://video.com/key=LePgDoTB7PDqCBQsRxa92w,end=1987654321/output.mp4The option specifies the time before which a signature remains valid. Value must be a UNIX Timestamp.
“ip” option
This option relates to Url to IP binding.
Usage of /key=KEY_VALUE,ip=ip_prefix1[;ip_prefix2,..]/, e.g.:
http://video.ahcdn.com/key=yP5e7rTfBrgPLhuDzCBg,ip=1.2.3.4/output.mp4
http://video.ahcdn.com/key=yP5e7rTfBrgPLhuDzCBg,ip=5.6.7;2a02:b48/output.mp4
http://video.ahcdn.com/key=yP5e7rTfBrgPLhuDzCBg,ip=2a02:b48/output.mp4The option binds urls to specific ip addresses or prefixes.
The value can define either a complete address, or just a prefix part. A prefix part is:
a set of octets (for IPv4), separated by the
.(dot) symbola set of hextets (for IPv6), separated by the
:(colon) symbol
The ip parameter is ignored by the CDN if the user’s request contains a valid referer header.
In hotlinking scenarios, spoofing the referer is considered difficult. Therefore, when the referer is correct, it is generally beneficial to allow requests from incorrect IP addresses to preserve traffic.
“limit” option
This option relates to the IP Per Url Limitation
Usage of /key=KEY_VALUE,limit=3/, e.g.:
http://video.com/key=UsijXw8tJK60yTBLu6wsyA,end=1987654321,limit=3/output.mp4The option defines a count of unique IP addresses allowed to access the url.
Value must be an integer number in a range [1..5].
“len” option
This parameter relates to Partial url signing.
Usage of /key=KEY_VALUE,len=80/, e.g.:
http://cdn.domain.com/key=9CVHszhqqsA,end=1374068216,len=6/1/2/3_720p.mp4The option defines a length of url or its part, used for signature verification.
By default, the whole url is being signed (the part after /key=VALUE), but it can be limited by a certain byte number. Limitation applies to the left side of the url.
sec
This parameter relates to Cookie Check.
Usage of /sec=COOKIE_NAME/, e.g.:
http://video.com/key=GnElxcWZ+dx27qMJBDQ,end=1987654321,ip=1.2.3.4/sec=cookie_name/output.mp4This parameter may be ignored.
hash
This parameter relates to Url Encryption.