CDN REST hooks¶
Overview¶
Before WCS build 5.3.398, the same REST hook application defaultApp was used both for publishing and playing streams fto?from the single server and for pulling WebRTC streams between CDN nodes. Since build 5.3.398, a special REST hook application cdnApp is used for CDN streams
03:11:58,847 INFO RestClient - API-ASYNC-pool-2-thread-8 SEND REST OBJECT ==>
URL:http://localhost:8081/apps/CdnApp/connect
OBJECT:
{
"custom" : {
"aclAuth" : "a5504bfd-c4ab-4c19-bc18-6eed885d4389"
},
"nodeId" : "f02vkq9PbK9A8MrBnKatCK9clLbHbPyR@192.168.1.39",
"appKey" : "cdnApp",
"sessionId" : "/192.168.1.64/192.168.1.39-Pci4P605",
"status" : "NEW",
"keepAlive" : false,
"mediaProviders" : [ "WebRTC" ]
}
This allows to implement a user authentication via REST hooks for publishing and playing streams only, not affecting the inner CDN streams.
Warning
You should add cdnApp application when updating WCS from a previous build
Configuration¶
By default, cdnApp application is used for WebRTC streams in CDN
This may be reverted to the previous behavior if needed
The parameter affects a closest route part to the server. For example, if cdn_app_name=defaultApp is set on Edge, this Edge will request Origin or Transcoder to use defaultApp to connect and pull streams from them to this Edge. So if you implement a backend to authorize streams inside the CDN, it is preferable to set the custom REST hook application on all the CDN nodes.
Adding REST hook application when updating WCS from a previous build¶
After updating WCS to build 5.3.398, if the new build is installed over the previous one, cdnApp should be manually added to the REST hook applications list using CLI: