Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take the first found IP from 'lookup' config key #79

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

boryn
Copy link

@boryn boryn commented Jan 18, 2022

At this moment, if IP is not found, the loop skips but eventually the last resolved IP is taken.

IMHO it should be the first IP grabbed, for example I'd like to get real user IP from cloudflare using this code:

'lookup' => [
        'server' => [
            'HTTP_CF_CONNECTING_IP',
            'REMOTE_ADDR',
        ],
        'headers' => [

        ],
    ],

Now, I need to use 'HTTP_CF_CONNECTING_IP' as the last option which is not intuitive, and we unnecessarily loop through all the items.

Solves: #78

boryn added 3 commits March 5, 2023 00:48
Don't go geo lookup when overwrite mode is not active and user timezone is already set
Disable geo lookup if not necessary
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