Added functionality to allow for looking up IP addresses
Moved existing functionality for looking up requesting IP address to use NGINX maps.
- Updated ipinfo.conf to remove old location blocks that have been moved to map.conf.
Added functionality to allow for looking up IP addresses.
- New map.conf that containing maps.
- Updated nginx.conf to increase map_hash_bucket_size above default value.
- Updated ipinfo.conf to include new location blocks to allow for looking up IP addresses.
Updated README to include details on added functionality.
Summary by CodeRabbit
-
New Features
- Introduced new URI endpoints for retrieving detailed IP address information, including country code, country name, AS number, and AS description.
-
Documentation
- Updated the README with examples on how to use the new IP information retrieval endpoints.
-
Refactor
- Reorganized and consolidated response header configurations in the Nginx server block.
- Simplified URI pattern handling in Nginx configurations for improved response mapping.
-
Style
- Adjusted Nginx configuration for clarity and maintainability.
-
Chores
- Configured Nginx performance settings with
map_hash_max_sizeandmap_hash_bucket_sizedirectives.
- Configured Nginx performance settings with
@coderabbitai review
Walkthrough
The update introduces new API endpoints for IP information retrieval in the README.md, reconfigures Nginx to optimize header management and response delivery, and employs map.conf to translate IP addresses and URIs into specific outputs. These changes streamline the server's operation and enhance its capability to provide detailed IP data.
Changes
| File Path | Change Summary |
|---|---|
README.md |
Added documentation for new URI endpoints to fetch IP address details. |
nginx/conf.d/ipinfo.conf |
Reorganized add_header directives and updated location blocks for better header and response management. |
nginx/conf.d/map.conf |
Introduced mapping of IP addresses and request URIs to specific responses. |
nginx/nginx.conf |
Added map_hash_max_size and map_hash_bucket_size directives for improved mapping efficiency. |
Poem
đđģ In the web's vast prairie, updates hop along,
New paths are carved, and the server grows strong.
With each request, it leaps without fail,
Serving data swift, like the wind in its tail. đŦī¸đ
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?
Tips
Chat with CodeRabbit Bot (@coderabbitai)
- You can reply to a review comment made by CodeRabbit.
- You can tag CodeRabbit on specific lines of code or files in the PR by tagging
@coderabbitaiin a comment. - You can tag
@coderabbitaiin a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.
CodeRabbit Commands (invoked as PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger a review. This is useful when automatic reviews are disabled for the repository.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai helpto get help.
Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - The JSON schema for the configuration file is available here.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json
I really need this. Was the request merged?
I'm looking for a self hosted API that I can provide an IP address and it can provide back this kind of info.
Hi @benisai I haven't had a chance to get back to reviewing the comments by @PeterDaveHello and making changes. So I don't believe it's been merged. You could always check out my fork if you need it.
Hi @benisai I haven't had a chance to get back to reviewing the comments by @PeterDaveHello and making changes. So I don't believe it's been merged. You could always check out my fork if you need it.
I will indeed. I see you have a docker container as well.
Hi @mitchellkellett,
Would you like to continue this PR? Thanks!