Skip to content

Configure CORS headers

Cross Origin Resource Sharing (CORS)

CORS Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the resource originated.

Peer5 performs requests from your video page to your video server.
Its most likely that you already have CORS configured if you are playing HLS or DASH streams in your website.
We recommend adding an additional CORS header specifically for HEAD requests that can further improve the P2P efficiency in some conditions:

HEAD
Note: You can replace the * with your website's domain.

1
2
'Access-Control-Allow-Origin': '*'  
'Access-Control-Expose-Headers': 'Content-Length'

Common servers examples


Having problems?
Chat with us or send us an email