From 1d152b6de0f74bef5214c1810a57123e156bb619 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Sat, 20 Jun 2026 10:25:05 -0500 Subject: [PATCH] remove: eliminar GeoIP completamente, no era necesario Co-Authored-By: Claude Sonnet 4.6 --- app/app.go | 9 --------- config/config.go | 6 ------ 2 files changed, 15 deletions(-) diff --git a/app/app.go b/app/app.go index 025139c..fed6db4 100755 --- a/app/app.go +++ b/app/app.go @@ -35,15 +35,6 @@ func LoadBuiltInMiddlewares(app *config.AppConfig) { -func Location(c *fiber.Ctx) (string, error) { - if Http.GeoIP == nil { - return "127.0.0.1", nil - } - ip := IP(c) - _, err := Http.GeoIP.GetLocation(ip) - return "127.0.0.1", err -} - var fetchIpFromString = regexp.MustCompile(`(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})`) var possibleHeaderes = []string{ "X-Original-Forwarded-For", diff --git a/config/config.go b/config/config.go index 86c183b..d59f847 100755 --- a/config/config.go +++ b/config/config.go @@ -11,7 +11,6 @@ import ( "github.com/joho/godotenv" "github.com/oarkflow/log" "github.com/sujit-baniya/flash" - "github.com/sujit-baniya/ip" ) // Config is a application configuration structure @@ -31,7 +30,6 @@ type AppConfig struct { Token Token `yaml:"token"` Profiler ProfilerConfig `yaml:"profiler"` Flash *flash.Flash - GeoIP *ip.GeoIpDB ConfigFile string } @@ -52,10 +50,6 @@ func (cfg *AppConfig) Setup() { modelFile := filepath.Join(cfg.Server.AssetPath, "rbac_model.conf") cfg.Auth.Setup(cfg.Database.DB, modelFile) } - mmdbPath := filepath.Join(cfg.Server.AssetPath, "GeoLite2-City.mmdb") - if _, err := os.Stat(mmdbPath); err == nil { - cfg.GeoIP = ip.NewGeoIpDB(MakeDir(mmdbPath)) - } } func (cfg *AppConfig) PrepareLog() {