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

Feature/geolocation middleware #2266

Merged

Conversation

acelaya
Copy link
Member

@acelaya acelaya commented Nov 15, 2024

Move logic to geolocate visitors from an event that is triggered after a visit is created, to a middleware that injects resolved geolocation into the request object.

This decouples the logic, simplifies the events chain when a short URL is visited, and allows the geolocation to be used for other purposes (like geolocation dynamic redirection rules)

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 94.28571% with 4 lines in your changes missing coverage. Please review.

Project coverage is 93.65%. Comparing base (a6e0916) to head (42ff0d5).
Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
...dule/Core/src/EventDispatcher/Event/UrlVisited.php 33.33% 4 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2266      +/-   ##
=============================================
- Coverage      93.70%   93.65%   -0.06%     
+ Complexity      1655     1653       -2     
=============================================
  Files            272      272              
  Lines           5781     5765      -16     
=============================================
- Hits            5417     5399      -18     
- Misses           364      366       +2     

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

@acelaya acelaya force-pushed the feature/geolocation-middleware branch from 3ef40c2 to 42ff0d5 Compare November 15, 2024 09:18
@acelaya acelaya marked this pull request as ready for review November 15, 2024 09:18
@acelaya acelaya merged commit a8f046d into shlinkio:develop Nov 15, 2024
31 checks passed
@acelaya acelaya deleted the feature/geolocation-middleware branch November 15, 2024 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.

1 participant