Skip to content

x.sessions.veb_middleware

fn create #

fn create[T, X](mut s sessions.Sessions[T]) veb.MiddlewareOptions[X]

create can be used to add session middleware to your veb app to ensure a valid session always exists. If a valid session exists the session data will be loaded into session_data, else a new session id will be generated. You have to pass the Context type as the generic type.