💚 End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Default to standard X-forwarded-for
Neeraj Guptaa8e2bfefe24d
diff --git a/docs/docs/self-hosting/installation/config.md b/docs/docs/self-hosting/installation/config.mdindex 5d5a845717..028b8adeab 100644--- a/docs/docs/self-hosting/installation/config.md+++ b/docs/docs/self-hosting/installation/config.md@@ -199,7 +199,7 @@ smtp:| Variable | Description | Default || -------------------------------------------- | --------------------------------------------- | ------- || `internal.silent` | Suppress external effects (e.g. email alerts) | `false` |-| `internal.trusted-client-ip-header` | Request header trusted by gin’s `TrustedPlatform` when the server runs behind a proxy | `CF-Connecting-IP` |+| `internal.trusted-client-ip-header` | Request header trusted by gin’s `TrustedPlatform` when the server runs behind a proxy (leave empty to use gin’s default order: X-Forwarded-For, X-Real-IP, remote addr) | || `internal.health-check-url` | External healthcheck URL | || `internal.hardcoded-ott` | Predefined OTPs for testing | || `internal.hardcoded-ott.emails` | E-mail addresses with hardcoded OTTs | `[]` |diff --git a/server/cmd/museum/main.go b/server/cmd/museum/main.goindex 618ae0c0b3..51ab0dc16f 100644--- a/server/cmd/museum/main.go+++ b/server/cmd/museum/main.go@@ -104,8 +104,6 @@ func main() {viper.SetDefault("apps.accounts", "https://accounts.ente.io")viper.SetDefault("apps.cast", "https://cast.ente.io")viper.SetDefault("apps.family", "https://family.ente.io")- // For existing users, we were defaulting to CF-Connecting-IP. Unless there's a good reason to change it, we should keep it same.- viper.SetDefault("internal.trusted-client-ip-header", "CF-Connecting-IP")setupLogger(environment)log.Infof("Booting up %s server with commit #%s", environment, os.Getenv("GIT_COMMIT"))diff --git a/server/configurations/local.yaml b/server/configurations/local.yamlindex 1ec3b54409..49856f081e 100644--- a/server/configurations/local.yaml+++ b/server/configurations/local.yaml@@ -346,9 +346,8 @@ internal:# minimize external side effects.silent: false# Header gin will trust for resolving the original client IP when requests are proxied.- # Defaults to CF-Connecting-IP; uncomment and change if your proxy uses another header.- # If empty, server will default to X-Forwarded-For,X-Real-IP,remote-addr (in that order).- # trusted-client-ip-header: CF-Connecting-IP+ # If the header or value is missing, server will default to X-Forwarded-For, X-Real-IP, remote-addr (in that order).+ trusted-client-ip-header:# If provided, this external healthcheck url is periodically pinged.health-check-url:# Hardcoded verification codes, useful for logging in when developing.