Skip to content

Dev backend geoip ci: Add custom geoip api

dave-lopeur requested to merge dev_backend_geoip_ci into staging

Problem :

curl -v https://freegeoip.app/json/109.214.217.26     
*   Trying 104.28.4.151:443...
* TCP_NODELAY set
*   Trying 2606:4700:3030::681c:597:443...
* TCP_NODELAY set
* Immediate connect fail for 2606:4700:3030::681c:597: Network is unreachable
*   Trying 2606:4700:3031::681c:497:443...
* TCP_NODELAY set
* Immediate connect fail for 2606:4700:3031::681c:497: Network is unreachable
* Connected to freegeoip.app (104.28.4.151) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=CA; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
*  start date: Feb  5 00:00:00 2020 GMT
*  expire date: Oct  9 12:00:00 2020 GMT
*  subjectAltName: host "freegeoip.app" matched cert's "freegeoip.app"
*  issuer: C=US; ST=CA; L=San Francisco; O=CloudFlare, Inc.; CN=CloudFlare Inc ECC CA-2
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55b04a60b1d0)
> GET /json/109.214.217.26 HTTP/2
> Host: freegeoip.app
> User-Agent: curl/7.65.3
> Accept: */*
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 503 
< date: Sun, 26 Apr 2020 16:04:34 GMT
< content-type: text/plain; charset=utf-8
< content-length: 37
< set-cookie: __cfduid=d37fc714f8af093db400f47092be884ca1587917074; expires=Tue, 26-May-20 16:04:34 GMT; path=/; domain=.freegeoip.app; HttpOnly; SameSite=Lax; Secure
< x-content-type-options: nosniff
< cf-cache-status: DYNAMIC
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< server: cloudflare
< cf-ray: 58a18a52a8a3083f-CDG
< cf-request-id: 0258d4c7ab0000083f2692b200000001
< 
Service unavailable, try again later

Solution:

Doing the exact same api but more reliable

Merge request reports

Loading