kmp_ctrl_add_header
The `kmp_ctrl_add_header` directive adds custom headers to responses for Kaltura Media Framework APIs.
Description
The kmp_ctrl_add_header directive allows administrators to specify custom HTTP headers in the response to Kaltura Media Framework API requests. This functionality is useful for delivering additional context, metadata, or control information alongside the standard responses sent from the media processing components of the Kaltura infrastructure.
The directive takes two arguments: the name of the header and the value to set for that header. When the Kaltura API processes a request, it evaluates the kmp_ctrl_add_header directive and includes the specified header in each response. This mechanism aids in enhancing the HTTP response with information that may be vital for clients consuming the media APIs, such as versioning info, client tracking, or security tokens that help with managing access to media content.
It is also important to note that multiple kmp_ctrl_add_header directives can be used to set various headers. Each invocation will produce a new header in the response. Care should be taken not to conflict with existing standard HTTP headers that may have already been defined within the Kaltura Media Framework API.
Config Example
kmp_ctrl_add_header "X-Custom-Header" "MyValue";
Ensure header names do not conflict with existing HTTP standard headers to avoid unexpected behavior.
Be cautious with sensitive information in header values, especially in public-facing APIs.