Apply certain sharing restrictions to your Cloudflare Stream videos.
By default, videos on Cloudflare Stream are viewable by anyone at any time, until you delete the video. Users can view the source of the embed code in their browser and get a URL to the video to share it with others.
There are two options to secure your Cloudflare Stream video: by enabling signed URLs or restricting the domains that can embed the video.
Enable Signed URLs
Enabling Signed URLs adds an additional layer of security to your video as it restricts the available viewing period to your desired time frame.
To enable Signed URLs in the Cloudflare dashboard:
- Log in to your Cloudflare account.
- Select the domain for which you would like to secure a Stream video.
- Click the Stream icon in the dashboard.
- Scroll down and click on the video that you would like to secure.
- In the menu that appears, click the Require Signed URLs checkbox.
- Before using the embed code to add the Stream video to your site, you must create a signing key and add that key to the embed code in the Cloudflare dashboard.
To learn how to enable signed URLs via the API, see the Stream documentation.
Restrict domains that can embed Stream video
You can also use the Cloudflare Stream dashboard UI to restrict the domain(s) that can embed your video.
To do this, follow Steps 1-4 above, then:
5. Enter the domain(s) that are allowed to embed the video separated by commas.
For more information, review these security considerations.