auto-web.middleware
Webserver middlewares
wrap-add-language
(wrap-add-language handler default-language)
(wrap-add-language handler default-language be-strategy)
In the request, :lang
is assigned with the be-strategy
In the response, the cookie is updated to locally store that language in the customer side.
See auto-web.http-request.lang/default-be-strategy to understand the default strategy applied.
wrap-exception-handling
(wrap-exception-handling handler body-fn)
Handles exceptions that were thrown along the line, handles both sync and async requests.
If the exception happen, body-fn
is called with http-request
and e
.