Supports the behaviour described in https://www.w3.org/DesignIssues/HTTPFilenameMapping.html Determines content-type based on the file extension. In case an identifier does not end on an extension matching its content-type, the corresponding file will be appended with the correct extension, preceded by $.

Hierarchy

Constructors

Properties

baseRequestURI: string
customExtensions: Record<string, string>
customTypes: Record<string, string>
logger: Logger = ...
rootFilepath: string
unknownMediaTypeExtension: "unknown" = 'unknown'

Methods

  • Helper function that removes the internal extension, one starting with $., from the given path. Nothing happens if no such extension is present.

    Parameters

    • path: string

    Returns string