pckg_pass_codes
The `pckg_pass_codes` directive configures specific response codes for Kaltura media processing APIs.
Description
The pckg_pass_codes directive within the Kaltura Media Framework Common NGINX Module is employed to specify a list of HTTP response codes that the NGINX server should pass to the client when handling Kaltura media-related API requests. This is particularly useful for indicating the status of various media processing tasks and providing meaningful feedback to clients, especially in a distributed framework where multiple media components may interact. The directive accepts one or more integer values corresponding to HTTP status codes, allowing for flexibility in the responses that can be sent back to clients.
This directive can be placed in the http, server, or location context of the NGINX configuration, meaning it can be adjusted either globally for all requests or locally for specific contexts based on the server's media handling configurations. When defined, NGINX will monitor incoming requests to designated routes that reach Kaltura APIs, and it will use the specified response codes as part of the response mechanism, which is essential for applications that depend on the accurate signaling of media processing outcomes.
When using pckg_pass_codes, it is important to ensure that valid HTTP statuses are utilized as defined within the HTTP specifications. Improper usage or undefined codes may lead to unexpected behavior, such as returning unrecognized response types or errors at the client end.
Config Example
http {
server {
location /api {
pckg_pass_codes 200 404 500;
}
}
}Ensure specified codes are valid HTTP status codes to avoid client errors.
Inappropriate status codes may create confusion for client applications expecting specific responses.
Code configurations should be tested thoroughly, especially in high-load environments to ensure responsiveness.