-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
addressing broken session due to a recent change that wasn't properly…
… tested, session is already created in the main config.go
- Loading branch information
1 parent
1e96a8b
commit 60085e9
Showing
2 changed files
with
4 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
package middleware | ||
|
||
import ( | ||
"github.com/alexedwards/scs/v2" | ||
"net/http" | ||
"github.com/CyberRoute/bruter/pkg/config" | ||
) | ||
|
||
var session *scs.SessionManager | ||
|
||
// SessionLoad loads and saves the session on every request | ||
func SessionLoad(next http.Handler) http.Handler { | ||
return session.LoadAndSave(next) | ||
func SessionLoad(app *config.AppConfig, next http.Handler) http.Handler { | ||
return app.Session.LoadAndSave(next) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters