subdomain


Description:


[ Version ( since = "0.3" ) ]
public HandlerCallback subdomain (string expected_subdomain, owned ForwardCallback<string> forward, bool strict = false, uint skip = 2)

Produce a matching middleware that accepts request which subdomain is consistent with the expectation.

If the expected subdomain is 'api', then 'api.example.com' and '*.api.example.com' will be accepted.

The joker '*' can be used to fuzzy-match a label.

Parameters:

expected_subdomain

expected subdomain pattern

forward

invoked if the subdomain matches

strict

strictly match the subdomains to have the exactly same amount of labels

skip

see Valum.extract_subdomains


Namespace: Valum
Package: valum-0.3