But will I be able to use that plugin with the SaaS version of Discourse (with the standard plan)?
No need for API calls, as Discourse ships with MaxMind integration out of the box, and you can simply call DiscourseIpInfo.get(ip) from your plugin.
Is this precise enough to target user from Quebec, Canada only. Most GeoIP services I found had a country precision but were not able to target a specific province in Canada.
If you are on our hosting, please contact our support. We can help you with custom plugins in our Enterprise plan.
So not possible with the Standard plan? My guess is the Enterprise plan is at least 3x the price of the Standard plan.
There will be a bunch of ways that this could have false positives or negatives. Your best bet is some other solution to the problem that you’re solving with the redirect.
Instead of a full redirect you might be able to use a theme-component that for example if your looking to redirect french users. It could maybe use Local to populate a popup in the login screen for the prefered site for francophones.
I’d welcome a PR to the Locations plugin (as a site setting) to determine a User’s location automatically and set this in their profile which in this mode could be read only (another setting) to prevent them changing it themselves (but might be by admin on request).
Then, as a bonus, you would be able to see everyone on a map
You could turn the logic in our geo blocking plugin around and instead of blocking certain regions, you could block all except certain regions. Shouldn’t be too hard - bonus points for the person that can do it with a one character edit. Hint: line 37 !
Or you can host with us on the Professional plan or up. In that case we’ll even extend the plugin for your use case.