vod_last_modified_types

The `vod_last_modified_types` directive specifies the MIME types for which the Last-Modified header will be sent in VOD responses.

Syntaxvod_last_modified_types mime-type [mime-type ...];
Defaultnone
Contexthttp, server, location
Arguments1+

Description

The vod_last_modified_types directive is designed for use within the NGINX-based Video on Demand (VOD) Packager module. It allows administrators to configure which MIME types will include the Last-Modified HTTP header in the responses for video content. By including last modified timestamps, clients can take advantage of caching mechanisms, making the content delivery more efficient by reducing unnecessary requests for updated content.

The directive accepts one or more MIME type strings as its arguments. These arguments determine the content types for which NGINX will return the Last-Modified header. When a request is made for a video file of a specified MIME type, if the file has been modified, NGINX will include the appropriate Last-Modified header in the response, enabling the client to determine if they need to download the content again or if a cached version is up to date.

It is crucial to ensure that this directive is correctly set in the proper context (http, server, or location) for it to take effect. Misconfiguring the directive can lead to responses lacking the Last-Modified header when expected, potentially affecting client caching behavior and could lead to performance issues in applications primarily relying on cache hits.

Config Example

http {
    vod_last_modified_types application/mp4 audio/mpeg;
}

Ensure that the directive is placed in the correct context (http, server, location) to take effect.

If no MIME types are specified, the default behavior does not send the Last-Modified header.

← Back to all directives