StaticContentConfig
A config for serving static content
Functions
Configures CacheControl for requested static content. For files, Resource is a requested File. For resources, Resource is a URL to a requested resource.
Configures ContentType for requested static content. If the block returns null
, default behaviour of guessing ContentType from the header will be used. For files, Resource is a requested File. For resources, Resource is a URL to a requested resource.
Enables automatic response to a HEAD
request for every file/resource that has a GET
defined.
Configures resources that should not be served. If this block returns true
for Resource, Application will respond with HttpStatusCode.Forbidden. Can be invoked multiple times. For files, Resource is a requested File. For resources, Resource is a URL to a requested resource.
Configures file extension fallbacks. When set, if a file is not found, the search will repeat with the given extensions added to the file name. The first match will be served.
Configures modification of a call for requested content. Useful to add headers to the response, such as HttpHeaders.ETag For files, Resource is a requested File. For resources, Resource is a URL to a requested resource.
Enables pre-compressed files or resources.