z_cowmachine_middleware (zotonic_core v1.0.0-rc.10)

Middleware for cowmachine, extra Context based initializations. This starts the https request processing after the site and dispatch rule have been selected by the z_sites_dispatcher middleware.

Link to this section Summary

Functions

Call cowmachine to handle the request with the given controller. Prepare the metadata for logger and set the relevant Context arguments.

Link to this section Functions

Link to this function

execute(Req, Env)

-spec execute(Req, Env) -> {ok, Req, Env} | {stop, Req}
           when Req :: cowboy_req:req(), Env :: cowboy_middleware:env().
Call cowmachine to handle the request with the given controller. Prepare the metadata for logger and set the relevant Context arguments.