diff --git a/app.go b/app.go index fb94605..631c89e 100644 --- a/app.go +++ b/app.go @@ -91,3 +91,7 @@ func (app *App) Run(addr string) error { func (app *App) AuthSupported() bool { return len(app.authHandlers) > 0 } + +func (app *App) SetSessionConfig(config session.Config) { + app.sessions = session.New(config) +} diff --git a/manager.go b/manager.go index 7bf6798..2d4332b 100644 --- a/manager.go +++ b/manager.go @@ -57,6 +57,7 @@ func (mm *ModuleManager) SetHomepage(template string, handlers ...func(map[strin mm.app.homepageHandlers = handlers } +// Deprecated: SetSessionConfig is deprecated, use app.SetSessionConfig func (mm *ModuleManager) SetSessionConfig(config session.Config) { - mm.app.sessions = session.New(config) + mm.app.SetSessionConfig(config) }