From cfcff8589133cccc7551bceda1abede4b970469b Mon Sep 17 00:00:00 2001 From: paanSinghCoder Date: Wed, 1 Oct 2025 12:04:09 +0530 Subject: [PATCH] fix: change ip header key --- config/sample.config.yaml | 2 +- core/authenticate/config.go | 2 +- docker-compose.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/sample.config.yaml b/config/sample.config.yaml index ea4fe7fa5..e897d97f0 100644 --- a/config/sample.config.yaml +++ b/config/sample.config.yaml @@ -111,7 +111,7 @@ app: validity: "720h" # secure flag for cookies secure: false - client_ip: "x-frontier-ip" + client_ip: "x-forwarded-for" client_country: "x-frontier-country" client_city: "x-frontier-city" # once authenticated, server responds with a jwt with user context diff --git a/core/authenticate/config.go b/core/authenticate/config.go index 73c793d50..33cd51ef9 100644 --- a/core/authenticate/config.go +++ b/core/authenticate/config.go @@ -60,7 +60,7 @@ type SessionConfig struct { } type SessionMetadataHeaders struct { - ClientIP string `yaml:"client_ip" mapstructure:"client_ip" default:"x-frontier-ip"` + ClientIP string `yaml:"client_ip" mapstructure:"client_ip" default:"x-forwarded-for"` ClientCountry string `yaml:"client_country" mapstructure:"client_country" default:"x-frontier-country"` ClientCity string `yaml:"client_city" mapstructure:"client_city" default:"x-frontier-city"` } diff --git a/docker-compose.yml b/docker-compose.yml index ce79830ad..5d067f780 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -74,7 +74,7 @@ services: - FRONTIER_SPICEDB_PRE_SHARED_KEY=frontier - FRONTIER_APP_RESOURCES_CONFIG_PATH=file:///opt - FRONTIER_UI_PORT=8083 - - FRONTIER_AUTHENTICATION_SESSION_HEADERS_CLIENT_IP=x-frontier-ip + - FRONTIER_AUTHENTICATION_SESSION_HEADERS_CLIENT_IP=x-forwarded-for - FRONTIER_AUTHENTICATION_SESSION_HEADERS_CLIENT_COUNTRY=x-frontier-country - FRONTIER_AUTHENTICATION_SESSION_HEADERS_CLIENT_CITY=x-frontier-city # - FRONTIER_APP_MAILER_SMTP_HOST=sandbox.smtp.mailtrap.io