Skip to content

Commit

Permalink
Merge pull request #58 from rebuy-de/unsecure-cookie
Browse files Browse the repository at this point in the history
add unsecure cookie option
  • Loading branch information
svenwltr authored Oct 8, 2020
2 parents fa4af57 + 5454620 commit f66f1c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/webutil/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ func SessionMiddlewareCookieDomain(domain string) SessionMiddlewareOption {
}
}

func SessionMiddlewareCookieUnsecure() SessionMiddlewareOption {
return func(c *sessionMiddlewareConfig) {
c.store.Options.Secure = false
}
}

func sessionMiddlewareFunc(next http.Handler, secret SessionSecret, opts ...SessionMiddlewareOption) http.Handler {
config := sessionMiddlewareConfig{
name: fmt.Sprintf("%s-session", cmdutil.Name),
Expand Down

0 comments on commit f66f1c0

Please sign in to comment.