axiomhq / next-axiom

The official Next.js library for Axiom.
https://axiom.co/vercel
MIT License
363 stars 27 forks source link

disable reverse proxy in browser environments #227

Open pondorasti opened 2 months ago

pondorasti commented 2 months ago

I'm using next-axiom with Next.js, and I would like to disable all configuration that proxies logging requests through my own domain. The new Vercel pricing doesn't make it worth it as we end up having to pay for each proxied request.

CleanShot 2024-08-17 at 14 00 00@2x

I would like to have an option that makes the reverse proxy opt in.

https://github.com/axiomhq/next-axiom/blob/7677543325a41a63d1a3970af307ae874671f490/src/platform/generic.ts#L26-L32

sangdth commented 2 months ago

I'm not sure but look like I have similar issue in local dev. Despite setting the NEXT_PUBLIC_AXIOM_URL, the requests on client still send through proxy url.

Screenshot 2024-08-20 at 20 25 12