Liking cljdoc? Tell your friends :D

ring.middleware.file

Middleware to serve files from a directory.

Most of the time you should prefer ring.middleware.resource instead, as this middleware will not work with files in jar or war files.

Middleware to serve files from a directory.

Most of the time you should prefer ring.middleware.resource instead, as this
middleware will not work with files in jar or war files.
raw docstring

file-requestclj

(file-request request root-path)
(file-request request root-path options)

If request matches a static file, returns it in a response. Otherwise returns nil. See: wrap-file.

If request matches a static file, returns it in a response. Otherwise
returns nil. See: wrap-file.
raw docstring

wrap-fileclj

(wrap-file handler root-path)
(wrap-file handler root-path options)

Wrap an handler such that the directory at the given root-path is checked for a static file with which to respond to the request, proxying the request to the wrapped handler if such a file does not exist.

Accepts the following options:

:index-files? - look for index.* files in directories, defaults to true :allow-symlinks? - serve files through symbolic links, defaults to false :prefer-handler? - prioritize handler response over files, defaults to false

Wrap an handler such that the directory at the given root-path is checked for
a static file with which to respond to the request, proxying the request to
the wrapped handler if such a file does not exist.

Accepts the following options:

:index-files?    - look for index.* files in directories, defaults to true
:allow-symlinks? - serve files through symbolic links, defaults to false
:prefer-handler? - prioritize handler response over files, defaults to false
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close