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

updatedb.js: ERROR: HTTP Request Failed [302 Found] #262

Closed
kijkmun opened this issue Feb 2, 2024 · 0 comments · Fixed by #263
Closed

updatedb.js: ERROR: HTTP Request Failed [302 Found] #262

kijkmun opened this issue Feb 2, 2024 · 0 comments · Fixed by #263

Comments

@kijkmun
Copy link

kijkmun commented Feb 2, 2024

Hello,
I have an 302 error when updating the database using node ./node_modules/geoip-lite/scripts/updatedb.js license_key=MY_LICENSE_KEY

A check on the browser's network showed that there was a redirection from https://download.maxmind.com/app/geoip_download... to Maxmind R2 presigned URLs mm-prod-geoip-databases.a2649acb697e2c09b632799562c076f2.r2.cloudflarestorage.com

I think there is a need to add a redirection code for the HTTP request
if ([301, 302, 303, 307, 308].includes(status)) { var newLocation = response.headers['location']; console.log('Redirecting to', newLocation); client = https.get(newLocation, onResponse); return;}

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 a pull request may close this issue.

1 participant