mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-05 00:39:38 +03:00
[PR #1234] feat: manage uncompressed geolite file #1099
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/1234
Author: @gucheen
Created: 1/12/2026
Status: 🔄 Open
Base:
main← Head:uncompressed-geolite-file📝 Commits (2)
3f8881ffeat: manage uncompressed geolite file5a0a2e5Merge branch 'main' into uncompressed-geolite-file📊 Changes
1 file changed (+51 additions, -1 deletions)
View changed files
📝
backend/internal/service/geolite_service.go(+51 -1)📄 Description
Since now maxmind limits download geolite db file in some countries, I have to download it from other sources, which provide uncompressed raw db file.
Add a check before try to unzip the db file through a magic number(https://stackoverflow.com/questions/6059302/how-to-check-if-a-file-is-gzip-compressed).
If not gzip, assume it's a regular database file, then write(copy) it to disk.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.