CDN Mesh Delivery delivery works from the origin and CDN of your choice. Use the following tutorial to correctly configure your Apache server(s).
What you need to configure:
- Enable CORS
-
Allow RANGE & OPTIONS requests
How to do it in your httpd.conf file
For our application, the configuration of nginx with rtmp-module is done inside the httpd.conf file, found in <installation path>/
.
In this tutorial we will show you what needs to be added to httpd.conf to support OPTIONS and range requests.
HTTP Section
The httpd.conf file defines what the server will make available on HTTP from it's filesystem, and how it will be made available (range requests authorization).
# Add a rewrite to respond with a 204 EMPTY on every OPTIONS request.
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=204,L]
#set CORS headers
Header always set Access-Control-Allow-Origin "*"
#always set these headers for OPTIONS And Range
# you can add more headers as needed - this is the minimum
Header always set Access-Control-Allow-Headers "origin,range,accept-encoding,referer"
Header always set Access-Control-Allow-Methods "GET, HEAD, OPTIONS"
Header always set Access-Control-Expose-Headers "Server,Range,Content-Length,Content-Range,Date"