Parcourir la source

auto update script executed

Toby Chui il y a 1 an
Parent
commit
990d248239
2 fichiers modifiés avec 22 ajouts et 134 suppressions
  1. 7 0
      mod/geodb/geoloader.go
  2. 15 134
      web/img/icon.ai

+ 7 - 0
mod/geodb/geoloader.go

@@ -5,9 +5,16 @@ import (
 	"encoding/csv"
 	"io"
 	"net"
+	"strings"
 )
 
 func (s *Store) search(ip string) string {
+	if strings.Contains(ip, ",") {
+		//This is a CF proxied request. We only need the front part
+		//Example 219.71.102.145, 172.71.139.178
+		ip = strings.Split(ip, ",")[0]
+		ip = strings.TrimSpace(ip)
+	}
 	//See if there are cached country code for this ip
 	ccc, ok := s.geoipCache.Load(ip)
 	if ok {

Fichier diff supprimé car celui-ci est trop grand
+ 15 - 134
web/img/icon.ai


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff