Kaynağa Gözat

auto update script executed

Toby Chui 1 yıl önce
ebeveyn
işleme
990d248239
2 değiştirilmiş dosya ile 22 ekleme ve 134 silme
  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 {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 15 - 134
web/img/icon.ai


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor