secure_token_content_type_mpd

The secure_token_content_type_mpd directive specifies the Content-Type header for DASH media presentation descriptions (MPD) when generating secure tokens in NGINX.

Syntaxsecure_token_content_type_mpd mime_type;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The secure_token_content_type_mpd directive is used within the context of the HTTP, server, or location blocks in an NGINX configuration. This directive defines the Content-Type header that will be sent for DASH (Dynamic Adaptive Streaming over HTTP) media presentation descriptions (MPD) when secure tokens are being generated. By setting this directive, you ensure that clients and CDNs accurately recognize and handle the media type, which is crucial for proper streaming functionality.

This directive is part of the Secure Token module which allows for the secure distribution of media content. When a request for an MPD file is made, NGINX evaluates the specified Content-Type along with any associated access control settings determined by the secure token's parameters. This allows for a more controlled access mechanism for media files, ensuring that only authorized requests can retrieve the MPD files while adhering to the specified media type. The correct type for MPD files typically is application/dash+xml, and this directive allows for flexibility in specifying alternate types if needed.

Config Example

# Set the Content-Type for MPD files
secure_token_content_type_mpd application/dash+xml;

Make sure to specify the correct mime type for DASH, otherwise clients may misinterpret the content.

This directive should be set in the appropriate context (http, server, or location) for it to work effectively.

← Back to all directives