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

feat: geoip improvements #7

Merged
merged 2 commits into from
Sep 29, 2023
Merged

feat: geoip improvements #7

merged 2 commits into from
Sep 29, 2023

Conversation

heilhead
Copy link
Collaborator

Description

This merges the geoblock and geoip crates, shuffling things around a bit:

  • Code in the old geoblock crate has been split into the axum/tower middleware (behind the middleware feature flag) and CountryFilter, for using separately;
  • GeoIpResolver has been changed a bit to also provide a non-owning data lookup, as an optimization;
  • A few other minor optimizations here and there.

How Has This Been Tested?

Via the relay integration.

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@heilhead heilhead requested review from xav and xDarksome September 29, 2023 06:17
crates/geoip/src/resolver.rs Outdated Show resolved Hide resolved
crates/geoip/src/block.rs Show resolved Hide resolved
crates/geoip/src/block/middleware.rs Outdated Show resolved Hide resolved
crates/geoip/src/resolver.rs Outdated Show resolved Hide resolved
crates/geoip/src/resolver.rs Outdated Show resolved Hide resolved
crates/geoip/src/resolver.rs Outdated Show resolved Hide resolved
crates/geoip/src/resolver/local.rs Outdated Show resolved Hide resolved
Copy link
Member

@xDarksome xDarksome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, moving everything into lib.rs is an easy fix 😄
It should, probably, be a go-to design for such small libraries anyway

@xav xav self-requested a review September 29, 2023 09:45
@xav xav merged commit c5d0d06 into main Sep 29, 2023
7 checks passed
@xav xav deleted the feat/geoip-improvements-rebased branch September 29, 2023 09:47
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.

3 participants