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§
- certificate
certificate
- connection
connection
- fastcgi
kvarn-fastcgi-client
- php
php
- push
push
- reverse_proxy
reverse-proxy
- templates
templates
- view_counter
view-counter
Functions§
- Makes the client download the file.
- Mounts all extensions specified in Cargo.toml dependency declaration. The extensions listed below will always get included in your server after calling this function.
- Creates a new
Extensions
and adds all enabledkvarn_extensions
.
Type Aliases§
- 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.