Pārlūkot izejas kodu

auto update script executed

Toby Chui 1 gadu atpakaļ
vecāks
revīzija
990d248239
2 mainītis faili ar 22 papildinājumiem un 134 dzēšanām
  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 {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 15 - 134
web/img/icon.ai


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels