x-agg-client-ip (populated by your backend) instead of from the request’s connecting IP. Enabled by Snag, per app. Once on, every active API key on the app is trusted.
Requirements
Before requesting enablement:requireApiKey: truemust be set on your app (Security Settings in the partner dashboard). While trusted-proxy is enabled, this cannot be disabled.- Every request must include
x-app-api-key. Requests with onlyx-app-idgo through standard geo resolution even when trusted-proxy is enabled. - Your edge proxy must strip or overwrite any inbound
x-agg-client-ipheader. If an end user can passx-agg-client-ipthrough your proxy, geo enforcement is defeated.
Header rules
Setx-agg-client-ip on every request your backend forwards to AGG:
- Value must be the end user’s client IP as your server observed it.
- Your proxy must strip or overwrite any inbound
x-agg-client-ip. - Single IP value. Comma-separated lists are rejected.
- IPv4 or IPv6, public addresses only. Private/reserved ranges resolve to null.
Behaviour
- Trusted app + valid
x-app-api-key+ validx-agg-client-ip: AGG resolves country from that IP. - Trusted app + valid
x-app-api-key+ missing or unresolvablex-agg-client-ip: AGG falls back to standard geo resolution against your backend’s connecting IP, which is potentially blocked. The request is not rejected with 403. - Trusted app + missing
x-app-api-key: rejected byrequireApiKeyenforcement before geo runs. - App not trusted: standard geo resolution;
x-agg-client-ipis ignored if present.
Responsibilities
Enabling trusted-proxy on your app shifts geo enforcement responsibility from AGG to you. By requesting enablement, you assert:- Every
x-agg-client-ipvalue AGG receives originates from your server’s observation of the end-user connection. - End users cannot inject
x-agg-client-ipthrough your proxy. - You are responsible for geo compliance for your users while trusted-proxy is enabled.
Limitations
- Country resolution only. No region or state granularity.
- ~98-99% accuracy. VPN exits resolve to the VPN’s exit country. Mobile carrier and satellite ranges are occasionally misclassified.
- The flag is per-app. When enabled, every active API key on the app is trusted. There is no per-key opt-in.
Requesting enablement
Emailsupport@agg.market with:
- The app ID.
- Confirmation that
requireApiKey: trueis set on the app. - Confirmation that your proxy strips inbound
x-agg-client-ip.