Crate kvarn_extensions

Source
Expand description

§Kvarn extensions

A supporter-lib for Kvarn to supply extensions to the web server.

Use new() to get started quickly.

§An introduction to the Kvarn extension system

On of the many things Kvarn extensions can to is bind to extension declarations and to file extensions. For example, if you mount the extensions download, it binds the extension declaration download. If you then, in a file inside your public/ directory, add !> download to the top, the client visiting the url pointing to the file will download it.

Re-exports§

pub use connection::Connection;connection
pub use reverse_proxy::localhost;reverse-proxy
pub use reverse_proxy::static_connection;reverse-proxy
pub use reverse_proxy::Manager as ReverseProxy;reverse-proxy
pub use push::mount as mount_push;push
pub use push::SmartPush;push
pub use php::mount_php as php;php
pub use templates::templates as templates_ext;templates

Modules§

certificatecertificate
connectionconnection
fastcgikvarn-fastcgi-client
parse
phpphp
pushpush
reverse_proxyreverse-proxy
templatestemplates
view_counterview-counter

Functions§

cache
download
Makes the client download the file.
force_cache
hide
ip_allow
mount_all
Mounts all extensions specified in Cargo.toml dependency declaration. The extensions listed below will always get included in your server after calling this function.
new
Creates a new Extensions and adds all enabled kvarn_extensions.

Type Aliases§

ForceCacheRules
Forces the responses matching rules to be cached according to their respective preference. Useful when you have compiled away cache, but still want images and fonts to be cached.