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

    Parameter

    Parameter response: the router response

    Parameter

    Parameter filePath: the path of the file being served

    Parameter

    Parameter fileAttributes: an array of attributes of the file being served

    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