Skip to content
locate-me v0.1.0
Checking

ReferencePlayground Lookups

Playground Lookups

Keyless lookups that power the playground. They are limited per client address and meant for trying the API, not for applications.

  • No key
  • 30 per minute per client
GET/playground/lookup/{ip}
GET/playground/lookup/me

Behaviour

Parameters, responses and errors are those of Lookup, including lang and me. What differs is the limit:

  • Each client address has its own bucket, with IPv6 grouped per /64: docs.playground_burst (10) at once, refilling at docs.playground_per_minute (30).
  • RateLimit-* headers describe that bucket. Past it, requests get 429 rate_limited with Retry-After.
  • The limiter tracks at most limits.max_tracked_clients addresses. When that many are active, new clients are refused until entries expire.
curl -i http://localhost:8080/playground/lookup/1.1.1.1

Configuration

config.toml
[docs]
enabled = true                # documentation and playground at / and /docs
playground = true             # keyless playground lookups
playground_per_minute = 30    # per client address
playground_burst = 10

The playground* settings apply live within 5 seconds. With playground = false the routes answer 404 route_not_found and the playground asks for a key, then calls /v1/lookup. enabled = false removes the documentation, the playground and these routes after a restart.

On a private deployment, turn the playground off: anyone who can reach the server can otherwise look up addresses within the limit above.

Esc