Danysan1 left a comment (openstreetmap/openstreetmap-website#6851)

I implemented the banner country filtering and configured our banner to be 
visible only in Italy.
There is no documentation in the repo about the geoip functionality, but if I 
understand correctly in order to test this feature locally I would need not 
only to simulate the user IP but also to have a maxmind geoip db file and 
configure it in maxmind_database, and since maxmind files require a commercial 
license it's impossible for me to test it.
The closest test I could do was short-circuiting the ip_to_country metod to 
return a fixed country code, and with this setting it works fine:
<img width="1745" height="1028" alt="Screenshot 2026-03-08 102452" 
src="https://github.com/user-attachments/assets/1bb08df4-27fa-465f-88d6-2f021c8fc2e8";
 />
<img width="1748" height="1023" alt="Screenshot 2026-03-08 102404" 
src="https://github.com/user-attachments/assets/581b4469-1e60-425c-9102-b1807033438c";
 />
If there is a better way to test it locally, please let me know,


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6851#issuecomment-4035071367
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6851/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to