forked from NYANDEV/forgejo
format with gofumpt (#18184)
* gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
This commit is contained in:
parent
1d98d205f5
commit
54e9ee37a7
423 changed files with 1585 additions and 1758 deletions
|
@ -14,33 +14,31 @@ import (
|
|||
"code.gitea.io/gitea/modules/log"
|
||||
)
|
||||
|
||||
var (
|
||||
// SessionConfig defines Session settings
|
||||
SessionConfig = struct {
|
||||
Provider string
|
||||
// Provider configuration, it's corresponding to provider.
|
||||
ProviderConfig string
|
||||
// Cookie name to save session ID. Default is "MacaronSession".
|
||||
CookieName string
|
||||
// Cookie path to store. Default is "/".
|
||||
CookiePath string
|
||||
// GC interval time in seconds. Default is 3600.
|
||||
Gclifetime int64
|
||||
// Max life time in seconds. Default is whatever GC interval time is.
|
||||
Maxlifetime int64
|
||||
// Use HTTPS only. Default is false.
|
||||
Secure bool
|
||||
// Cookie domain name. Default is empty.
|
||||
Domain string
|
||||
// SameSite declares if your cookie should be restricted to a first-party or same-site context. Valid strings are "none", "lax", "strict". Default is "lax"
|
||||
SameSite http.SameSite
|
||||
}{
|
||||
CookieName: "i_like_gitea",
|
||||
Gclifetime: 86400,
|
||||
Maxlifetime: 86400,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
}
|
||||
)
|
||||
// SessionConfig defines Session settings
|
||||
var SessionConfig = struct {
|
||||
Provider string
|
||||
// Provider configuration, it's corresponding to provider.
|
||||
ProviderConfig string
|
||||
// Cookie name to save session ID. Default is "MacaronSession".
|
||||
CookieName string
|
||||
// Cookie path to store. Default is "/".
|
||||
CookiePath string
|
||||
// GC interval time in seconds. Default is 3600.
|
||||
Gclifetime int64
|
||||
// Max life time in seconds. Default is whatever GC interval time is.
|
||||
Maxlifetime int64
|
||||
// Use HTTPS only. Default is false.
|
||||
Secure bool
|
||||
// Cookie domain name. Default is empty.
|
||||
Domain string
|
||||
// SameSite declares if your cookie should be restricted to a first-party or same-site context. Valid strings are "none", "lax", "strict". Default is "lax"
|
||||
SameSite http.SameSite
|
||||
}{
|
||||
CookieName: "i_like_gitea",
|
||||
Gclifetime: 86400,
|
||||
Maxlifetime: 86400,
|
||||
SameSite: http.SameSiteLaxMode,
|
||||
}
|
||||
|
||||
func newSessionService() {
|
||||
sec := Cfg.Section("session")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue