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

Fixed an issue where updatejs was not updating due to redirect 302 #263

Merged
merged 4 commits into from
Feb 8, 2024
Merged

Fixed an issue where updatejs was not updating due to redirect 302 #263

merged 4 commits into from
Feb 8, 2024

Conversation

JamieStivala
Copy link
Contributor

Follows the redirect on MaxMind Servers to prevent issue "Error 302"

Fixes #262

scripts/updatedb.js Outdated Show resolved Hide resolved
scripts/updatedb.js Outdated Show resolved Hide resolved
@bluesmoon
Copy link
Collaborator

Thanks for the PR. Left a few comments.

@JamieStivala
Copy link
Contributor Author

Thanks for quickly reviewing. Updated the PR to match the code style and added redirect 303, 307 and 308.

@bluesmoon bluesmoon merged commit 89a2e02 into geoip-lite:main Feb 8, 2024
@justColbs
Copy link

I see this was merged into main, but it's not coming down with npm install geoip-lite. I can download from the branch or the commit, but it takes sooooo long for some reason. Any idea when this will be available via npm? Thanks!

@yaruno
Copy link

yaruno commented Feb 15, 2024

Love the project. But I suppose this needs a new release to NPM. Just ran into same issue. Npm installed node-geoip, created license keys and attempted to run the updatedb script and got 302 Error. When I manually fixed the updatedb.js with this PRs code it started to work, but this approach is a bit janky.

@JamieStivala
Copy link
Contributor Author

The change has not been pushed to the NPM Yet. What you can do until @bluesmoon pushed it to NPM is install the package from GitHub by doing npm install git+https://github.com/geoip-lite/node-geoip.git

@bluesmoon
Copy link
Collaborator

Hi all, I've pushed the new version to npm.

@justColbs
Copy link

@bluesmoon Thank you so much! Works great now. I wanted to mention that Github and NPM are not aligned yet it appears. unless I declare @1.4.10 at install this update doesn't install this redirect error fix. Just thought I'd mention because I'm sure you plan to update and didn't want anyone else to get confused.

@bluesmoon
Copy link
Collaborator

@justColbs not sure what that means. npm shouldn't be pulling from github. When I look at https://www.npmjs.com/package/geoip-lite it shows that 1.4.10 is the latest version.

The git code has already moved past 1.4.10 since I'm making changes to the CI workflow.

@bluesmoon
Copy link
Collaborator

I checked the code that's cached in npm, and it shows the redirect handling code in there.

Trallp pushed a commit to privateJets/node-geoip that referenced this pull request Mar 6, 2024
…eoip-lite#263)

* Fixed an issue where updatejs was not updating due to redirect 302
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.

updatedb.js: ERROR: HTTP Request Failed [302 Found]
4 participants