ts_kmp_ctrl_add_header
The 'ts_kmp_ctrl_add_header' directive is used to add custom headers to Kaltura Media Protocol (KMP) requests in NGINX.
Description
The 'ts_kmp_ctrl_add_header' directive allows users to specify additional headers that will be included in requests handled by the Kaltura Media Framework. This functionality is particularly useful for media streaming setups where specific metadata needs to be conveyed along with KMP requests. The directive accepts exactly two arguments: the name of the header and its corresponding value. These headers can be crucial for ensuring that the media processing components of Kaltura correctly interpret and respond to the data embedded in the KMP requests, such as authorization tokens or other metadata.
When configured, every time a request is processed within the specified context (stream or server), the specified header and value are added to the outgoing KMP request. It is important to note that this directive may only be utilized in the appropriate contexts (either stream or stream server), and incorrect usage will result in NGINX returning an error during configuration parsing. Properly managing these headers can greatly enhance the interoperability and functionality of media handling within the Kaltura Media Framework.
Config Example
stream {
...
ts_kmp_ctrl_add_header X-Auth-Token auth_token;
ts_kmp_ctrl_add_header X-Custom-Header custom_value;
}Ensure that the header name and value are properly quoted if they contain spaces or special characters.
Using this directive outside of the 'stream' or 'stream server' context will lead to configuration errors.