Function kvarn_extensions::php::mount_php
source · [−]pub fn mount_php(
extensions: &mut Extensions,
connection: Connection,
capture_fn: Option<impl Fn(&FatRequest, &Host) -> bool + Send + Sync + 'static>
)
Available on crate feature
php
only.Expand description
Redirects all requests where the Uri::path
ends in .php
to connection
.
Priority is -8
.
capture_fn
can be used to pass other pages to PHP. Keep in mind the Fn
is ran for every request, so to check if it matches several pages,
create a hash map and try it there.
Setting that to
Some(|req, _host| req.uri().path() == "/sitemap.xml")
can be useful if you’re running WordPress.