A mapper that always returns a fixed content type for files.

Hierarchy

Constructors

  • Parameters

    • base: string

      Base URL.

    • rootFilepath: string

      Base file path.

    • contentType: string

      Fixed content type that will be used for all resources.

    • pathSuffix: string = ''

      An optional suffix that will be appended to all file paths. Requested file paths without this suffix will be rejected.

    • urlSuffix: string = ''

      An optional suffix that will be appended to all URL. Requested URLs without this suffix will be rejected.

    Returns FixedContentTypeMapper

Properties

baseRequestURI: string
contentType: string
logger: Logger = ...
pathSuffix: string
rootFilepath: string
unknownMediaTypeExtension: "unknown" = 'unknown'
urlSuffix: string

Methods