Skip to main content
Token signing is a stateless, CPU-bound operation: the backend receives a request, verifies the user, combines the video ID with the CDN secret key, and returns a signed URL. Gcore FastEdge runs this at the CDN edge in WebAssembly with no infrastructure to manage.
Add an authentication check before generating a token. Verify the requesting user has a valid session and is authorized to access the requested video. Without this check, any caller can request a token for any asset.

Demo endpoint

A working endpoint is available for testing and development: GET: https://video-token-102748.fastedge.app/?video=iKbrdNMcS9ylGuw&type=vod&expire=20
This app is bound to the Gcore demo CDN resource and signs tokens for demo-protected.gvideo.io only. Use it for testing — it cannot be used with a custom CDN resource.

Response

Environment variables

Configure these in the FastEdge dashboard before deploying the app:

FastEdge app source code

Use this as a starting point. Before deploying, replace the body of main with an authentication check appropriate for the application.