loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make offline mode as default to no connect external avatar service by default (#28548)

To keep user's privacy, make offline mode as true by default.

Users can still change it from installation ui and app.ini

authored by

Lunny Xiao and committed by
GitHub
177cea7c fe5a6163

+6 -5
+1 -1
custom/conf/app.example.ini
··· 234 234 ;MINIMUM_KEY_SIZE_CHECK = false 235 235 ;; 236 236 ;; Disable CDN even in "prod" mode 237 - ;OFFLINE_MODE = false 237 + ;OFFLINE_MODE = true 238 238 ;; 239 239 ;; TLS Settings: Either ACME or manual 240 240 ;; (Other common TLS configuration are found before)
+1 -1
docs/content/administration/config-cheat-sheet.en-us.md
··· 357 357 - `SSH_PER_WRITE_PER_KB_TIMEOUT`: **10s**: Timeout per Kb written to SSH connections. 358 358 - `MINIMUM_KEY_SIZE_CHECK`: **true**: Indicate whether to check minimum key size with corresponding type. 359 359 360 - - `OFFLINE_MODE`: **false**: Disables use of CDN for static files and Gravatar for profile pictures. 360 + - `OFFLINE_MODE`: **true**: Disables use of CDN for static files and Gravatar for profile pictures. 361 361 - `CERT_FILE`: **https/cert.pem**: Cert file path used for HTTPS. When chaining, the server certificate must come first, then intermediate CA certificates (if any). This is ignored if `ENABLE_ACME=true`. Paths are relative to `CUSTOM_PATH`. 362 362 - `KEY_FILE`: **https/key.pem**: Key file path used for HTTPS. This is ignored if `ENABLE_ACME=true`. Paths are relative to `CUSTOM_PATH`. 363 363 - `STATIC_ROOT_PATH`: **_`StaticRootPath`_**: Upper level of template and static files path.
+1 -1
docs/content/administration/config-cheat-sheet.zh-cn.md
··· 346 346 - `SSH_PER_WRITE_TIMEOUT`: **30s**:对 SSH 连接的任何写入设置超时。(将其设置为 -1 可以禁用所有超时。) 347 347 - `SSH_PER_WRITE_PER_KB_TIMEOUT`: **10s**:对写入 SSH 连接的每 KB 设置超时。 348 348 - `MINIMUM_KEY_SIZE_CHECK`: **true**:指示是否检查最小密钥大小与相应类型。 349 - - `OFFLINE_MODE`: **false**:禁用 CDN 用于静态文件和 Gravatar 用于个人资料图片。 349 + - `OFFLINE_MODE`: **true**:禁用 CDN 用于静态文件和 Gravatar 用于个人资料图片。 350 350 - `CERT_FILE`: **https/cert.pem**:用于 HTTPS 的证书文件路径。在链接时,服务器证书必须首先出现,然后是中间 CA 证书(如果有)。如果 `ENABLE_ACME=true`,则此设置会被忽略。路径相对于 `CUSTOM_PATH`。 351 351 - `KEY_FILE`: **https/key.pem**:用于 HTTPS 的密钥文件路径。如果 `ENABLE_ACME=true`,则此设置会被忽略。路径相对于 `CUSTOM_PATH`。 352 352 - `STATIC_ROOT_PATH`: **_`StaticRootPath`_**:模板和静态文件路径的上一级。
+2 -1
modules/repository/commits_test.go
··· 126 126 } 127 127 128 128 setting.GravatarSource = "https://secure.gravatar.com/avatar" 129 + setting.OfflineMode = true 129 130 130 131 assert.Equal(t, 131 - "https://secure.gravatar.com/avatar/ab53a2911ddf9b4817ac01ddcd3d975f?d=identicon&s="+strconv.Itoa(28*setting.Avatar.RenderedSizeFactor), 132 + "/avatars/avatar2?size="+strconv.Itoa(28*setting.Avatar.RenderedSizeFactor), 132 133 pushCommits.AvatarLink(db.DefaultContext, "user2@example.com")) 133 134 134 135 assert.Equal(t,
+1 -1
modules/setting/server.go
··· 315 315 RedirectOtherPort = sec.Key("REDIRECT_OTHER_PORT").MustBool(false) 316 316 PortToRedirect = sec.Key("PORT_TO_REDIRECT").MustString("80") 317 317 RedirectorUseProxyProtocol = sec.Key("REDIRECTOR_USE_PROXY_PROTOCOL").MustBool(UseProxyProtocol) 318 - OfflineMode = sec.Key("OFFLINE_MODE").MustBool() 318 + OfflineMode = sec.Key("OFFLINE_MODE").MustBool(true) 319 319 if len(StaticRootPath) == 0 { 320 320 StaticRootPath = AppWorkPath 321 321 }