summaryrefslogtreecommitdiffstats
path: root/modules/setting/session.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/session.go')
-rw-r--r--modules/setting/session.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/setting/session.go b/modules/setting/session.go
index 31f876132d..eb5e1a1875 100644
--- a/modules/setting/session.go
+++ b/modules/setting/session.go
@@ -5,12 +5,12 @@
package setting
import (
- "encoding/json"
"path"
"path/filepath"
"strings"
"code.gitea.io/gitea/modules/log"
+ jsoniter "github.com/json-iterator/go"
)
var (
@@ -53,6 +53,7 @@ func newSessionService() {
SessionConfig.Maxlifetime = sec.Key("SESSION_LIFE_TIME").MustInt64(86400)
SessionConfig.Domain = sec.Key("DOMAIN").String()
+ json := jsoniter.ConfigCompatibleWithStandardLibrary
shadowConfig, err := json.Marshal(SessionConfig)
if err != nil {
log.Fatal("Can't shadow session config: %v", err)