Use Accept request header instead of user agent to figure out non-browser clients. Funny fact, I borrowed the idea from a fork ('8a3e142cf3/router/generic.go (L33)')

This commit is contained in:
2022-04-30 17:10:22 +02:00
parent 12da27ddab
commit 9070e9a2c2
5 changed files with 124 additions and 57 deletions

View File

@ -47,7 +47,7 @@ curl -6 ifconfig.es
## Endpoints
- https://ifconfig.es/
- https://ifconfig.es/json
- https://ifconfig.es/json (this is the same as `curl -H "Accept: application/json" https://ifconfig.es/`)
- https://ifconfig.es/geo
- https://ifconfig.es/geo/city
- https://ifconfig.es/geo/country