Skip to content

Add No-Parameter Endpoint for GeoIP Lookup#2

Open
smp46 wants to merge 4 commits into
Malith-Rukshan:mainfrom
smp46:main
Open

Add No-Parameter Endpoint for GeoIP Lookup#2
smp46 wants to merge 4 commits into
Malith-Rukshan:mainfrom
smp46:main

Conversation

@smp46

@smp46 smp46 commented Jun 16, 2025

Copy link
Copy Markdown

These changes allow users to perform IP geolocation lookups without specifying an IP address, defaulting to using the client's IP. For example, https://your-domain.com/ will now return geolocation data based on the requester’s IP address.

I also made sure to check if the client IP belongs to an internal Docker Network. If it does, it will try to get the IP from the "X-Forwarded-For" header. This way if running behind Docker (and not wanting to use network_mode:host) the container can be put behind a Reverse Proxy and still function as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant