|
@@ -225,6 +225,25 @@ REVERSE_PROXY_AUTHENTICATION_HEADER = X-WEBAUTH-USER
|
|
|
; Whether to enable email notifications for users.
|
|
|
ENABLE_EMAIL_NOTIFICATION = false
|
|
|
|
|
|
+[session]
|
|
|
+; The session provider, either "memory", "file", or "redis".
|
|
|
+PROVIDER = memory
|
|
|
+; The configuration for respective provider:
|
|
|
+; - memory: does not need any config yet
|
|
|
+; - file: session file path, e.g. `data/sessions`
|
|
|
+; - redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
|
|
|
+PROVIDER_CONFIG = data/sessions
|
|
|
+; The cookie name to store the session identifier.
|
|
|
+COOKIE_NAME = i_like_gogs
|
|
|
+; Whether to set cookie in HTTPS only.
|
|
|
+COOKIE_SECURE = false
|
|
|
+; The GC interval in seconds for session data.
|
|
|
+GC_INTERVAL = 3600
|
|
|
+; The maximum life time in seconds for a session.
|
|
|
+MAX_LIFE_TIME = 86400
|
|
|
+; The cookie name for CSRF token.
|
|
|
+CSRF_COOKIE_NAME = _csrf
|
|
|
+
|
|
|
; Attachment settings for releases
|
|
|
[release.attachment]
|
|
|
; Whether attachments are enabled. Defaults to `true`
|
|
@@ -285,28 +304,6 @@ INTERVAL = 60
|
|
|
; memcache: `127.0.0.1:11211`
|
|
|
HOST =
|
|
|
|
|
|
-[session]
|
|
|
-; Either "memory", "file", or "redis", default is "memory"
|
|
|
-PROVIDER = memory
|
|
|
-; Provider config options
|
|
|
-; memory: not have any config yet
|
|
|
-; file: session file path, e.g. `data/sessions`
|
|
|
-; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
|
|
|
-; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
|
|
|
-PROVIDER_CONFIG = data/sessions
|
|
|
-; Session cookie name
|
|
|
-COOKIE_NAME = i_like_gogs
|
|
|
-; If you use session in https only, default is false
|
|
|
-COOKIE_SECURE = false
|
|
|
-; Enable set cookie, default is true
|
|
|
-ENABLE_SET_COOKIE = true
|
|
|
-; Session GC time interval, default is 3600
|
|
|
-GC_INTERVAL_TIME = 3600
|
|
|
-; Session life time, default is 86400
|
|
|
-SESSION_LIFE_TIME = 86400
|
|
|
-; Cookie name for CSRF
|
|
|
-CSRF_COOKIE_NAME = _csrf
|
|
|
-
|
|
|
[picture]
|
|
|
; Path to store user uploaded avatars
|
|
|
AVATAR_UPLOAD_PATH = data/avatars
|