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

Add new geolocatio-country-code redirect condition type #2257

Conversation

acelaya
Copy link
Member

@acelaya acelaya commented Nov 12, 2024

Part of #1774

Add a new type of condition for the dynamic rule-based redirection system.

This condition checks if the ISO 3166-1 alpha-2 country code resulting of geolocating current visitor matches configured country code.

This condition will never match if geolocation is not configured, or it is disabled, and there's always a chance of a visitor to be incorrectly geolocated, so there's a small chance of false negatives/positives.

During condition creation, only the country code will be validated, but Shlink won't warn you if geolocation is not configured/enabled at that point.

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.68%. Comparing base (9a69d06) to head (7ddb3e7).
Report is 9 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2257      +/-   ##
=============================================
+ Coverage      93.64%   93.68%   +0.04%     
- Complexity      1637     1647      +10     
=============================================
  Files            271      272       +1     
  Lines           5726     5768      +42     
=============================================
+ Hits            5362     5404      +42     
  Misses           364      364              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acelaya acelaya force-pushed the feature/geolocation-country-code-redirects branch 2 times, most recently from f425c14 to 7051acb Compare November 12, 2024 07:41
@acelaya acelaya force-pushed the feature/geolocation-country-code-redirects branch from 451f870 to b5b5f92 Compare November 12, 2024 09:25
@acelaya acelaya force-pushed the feature/geolocation-country-code-redirects branch from d087e8e to f2371b6 Compare November 13, 2024 09:02
@acelaya acelaya force-pushed the feature/geolocation-country-code-redirects branch from 4321217 to 4619ebd Compare November 14, 2024 07:21
@acelaya acelaya force-pushed the feature/geolocation-country-code-redirects branch from 5385a1a to fd34332 Compare November 14, 2024 08:28
@acelaya acelaya marked this pull request as ready for review November 14, 2024 08:31
@acelaya acelaya merged commit dbef32f into shlinkio:develop Nov 14, 2024
31 checks passed
@acelaya acelaya deleted the feature/geolocation-country-code-redirects branch November 14, 2024 08:43
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