Плагин Geo Blocking

What could we guess… 98% of those are bots :winking_face_with_tongue: To show or not to show a message… it depends. If there is need to guide geoip-blocked real humans to use VPN, then showing the reason is smart move. Waste of time with bots, though.

1 лайк

The plugin was originally made to enforce economic sanctions against specific countries.

2 лайка

This gives now error 500. It goes nicely thru rebuilding, though.

Is it fixable, please?

Otherwise I have to install Nginx to act as a reverse proxy, and then I would be too afraid to ask any support here ever :joy:

Fixed

@juanjosegzl guess your LLM was too enthousiastic and we both didn’t test your PR well enough

1 лайк

Sorry I did not catch that, I was too focused on my own use case

1 лайк

Sorry, there is still issues.

I have reverted the most recent PR to the plugin and I will reconsider it in a few weeks when I have time. Sorry all for the inconvenience.

2 лайка

S…uch happens. But that plugin is really needed. Thanks for your efforts.

1 лайк

Sorry for all the problems, I re visited the changes and I found an issue with moderating, now I have fixed it

Richard I pushed the changes, basically fixing the moderating issue and disable cache when moderating settings are changed.

2 лайка

Thank you!
I am currently traveling and I will revisit the PR in 10 days from now.

It works for me. Geoblocking itself I haven’t tested yet.

Well, my anonymous user got too fast typing, what is funny becuse I’m on iPad with virtual keyboard :joy: but that has nothing to do with this plugin.

Thanks.

2 лайка

@juanjosegzl I have now merged your latest PR. Thank you for your useful contribution!

1 лайк

Does this work if you are using cloudflare?

Cloudflare transmits the IP address in the CF-IPCountry header variable.

Yes it works if you follow the guide Using Discourse with Cloudflare: Best Practices

This is incorrect. Cloudflare transmits the country code in that header, not the IP address, and only if you’ve enabled it. The plugin does not use that though, it uses the internal Discourse Maxmind database.

Здравствуйте, плагин отличный, у меня небольшая просьба: можно добавить настройку для кастомизации сообщений?

О, я понял, можно использовать функцию «Тексты сайта» по адресу /admin/customize/site_texts, дополнительная настройка не требуется.

1 лайк