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,
for best performance it is required that your video server will respond with the following headers per request type:


  • 'Access-Control-Allow-Origin': '*'
  • 'Access-Control-Expose-Headers': 'Content-Length, Content-Range'


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

options requests (sometime called preflight) are performed in many common browsers like Chrome and Firefox.

  • 'Access-Control-Allow-Origin': '*'
  • 'Access-Control-Allow-Methods': 'GET, HEAD, OPTIONS'
  • 'Content-Length': '0'

status: 200 | 204

Common servers examples

Having problems?
Chat with us or send us an email