fix: GeoIP opcional, no paniquea si falta GeoLite2-City.mmdb

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-20 10:22:55 -05:00
co-authored by Claude Sonnet 4.6
parent e28e2823dc
commit d66fe95514
2 changed files with 7 additions and 5 deletions
+3 -3
View File
@@ -36,11 +36,11 @@ 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)
if err != nil {
return "127.0.0.1", err
}
return "127.0.0.1", err
}