The player requests the master manifest, then requests each nested file on its own. Query string forwarding copies md5 and expires from that first request onto the files that follow, so HLS and MPEG-DASH need Secure Token and Query String Forwarding together.
Secure Token
Enable Secure Token in the CDN resource settings. A protected URL looks like this:
When the token is valid, CDN returns video manifests and segments with 200 OK. When the token expires, CDN returns 403 Forbidden or 410 Gone, so the expired URL no longer downloads the file.
Token refresh replaces a short-lived token in the player before playback stops.
Query String Forwarding
HLS and MPEG-DASH split playback across a master manifest and the rendition manifests, segments, and subtitles linked from it. The player requests the master manifest first, then follows those links.
For protected HLS or MPEG-DASH video, enable Query String Forwarding so CDN copies the token parameters from the master manifest request onto the related files.
Recommended settings for HLS and MPEG-DASH
For HLS and MPEG-DASH video protected by Secure Token, configure Query String Forwarding with these values:
Field
Values
Forward from file types
m3u8, mpd
Forward to file types
m3u8, ts, mp4, m4s, vtt
Forward only keys
md5, expires
Use m3u8 for HLS manifests and mpd for MPEG-DASH manifests. Use ts, mp4, m4s, and vtt for nested media and subtitle files. Add m4a or m4v when the manifests reference those files and they also need the same query parameters.
With Query String Forwarding enabled, a request to:
/coffee_run/master.m3u8?md5=TOKEN&expires=EXPIRY
is propagated to all nested manifests and segments inside the manifest body automatically.
As a result, the player reads tokens from the modified manifests and does not attach a separate token to each file.
Token path rule
For requests with Secure Token and Query String Forwarding enabled, generate the token for the directory path, not for the exact manifest filename. One token then covers every file in that directory.
The token covers every file in /coffee_run/, while a file in a subdirectory needs its own token.
URL matching, IP binding, and 403 errors from mobile IP rotation (CGNAT) are handled in Secure Token. Nested files receive md5 and expires through query string forwarding.
Demo links
Use these links to check how Secure Token and Query String Forwarding work with a real HLS or MPEG-DASH stream:
A secure token checks a temporary signature on a video URL. Query string forwarding copies md5 and expires from the master manifest onto the files the player requests next. HLS and MPEG-DASH need both options on.
This call turns on secure token and query string forwarding together.
secure_key requires enabled and key. type2 leaves the client IP out of the signature. A request that omits key returns HTTP 400.
query_string_forwarding reads md5 and expires from m3u8 and mpd files and adds them to m3u8, ts, mp4, m4s, and vtt files. enabled, forward_from_file_types, and forward_to_file_types are required.