Back to Kitura

ResponseHeadersSetter

docs/docsets/Kitura.docset/Contents/Resources/Documents/Protocols/ResponseHeadersSetter.html

3.0.1866 B
Original Source

ResponseHeadersSetter

public protocol ResponseHeadersSetter

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

`

                setCustomResponseHeaders(response:filePath:fileAttributes:)
                `

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

|