basepath


Description:


[ Version ( since = "0.3" ) ]
public HandlerCallback basepath (string path, owned HandlerCallback forward)

Rebase and forward requests which path match the provided basepath.

If the VSGI.Request.uri path has the provided prefix, it is stripped and the resulting request is forwared.

Typically, a leading slash and no ending slash are used to form the prefix path (e.g. '/user').

If 'next' is called while forwarding, the URI path is restored.

Error which message consist of a 'Location' header are prefixed by the basepath.

Parameters:

path

path prefix stripped on forwarded requests

forward

callback used to forward the request


Namespace: Valum
Package: valum-0.3



2022 vala-language.org