ResponseHeadersSetter

public protocol ResponseHeadersSetter

A protocol for providing a custom method for setting the headers of the response of static file serving middleware.

  • Set the headers of the response

    Declaration

    Swift

    func setCustomResponseHeaders(response: RouterResponse, filePath: String, fileAttributes: [FileAttributeKey : Any])

    Parameters

    response

    the router response

    filePath

    the path of the file being served

    fileAttributes

    an array of attributes of the file being served