지리적 차단 플러그인

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개의 좋아요

안녕하세요, 제한된 지역의 특정 IP가 접근할 수 있도록 허용하려면 어떻게 설정해야 하는지 궁금합니다.

요청 병합을 생성했습니다:
add ip whitelist by singi2016cn · Pull Request #11 · communiteq/discourse-geo-blocking

1개의 좋아요

PR 올려주셔서 감사합니다. 해당 PR에 대해 답변을 남겼습니다. 기능 개선은 매우 환영하지만, 모든 요청마다 추가적인 데이터베이스 호출이 발생하는 것은 받아들일 수 없습니다. 해당 코드를 지연 로딩 캐시 블록 안쪽으로 이동해 주시면 승인하겠습니다.

2개의 좋아요

네, 문제를 파악했습니다. 수정 후 다시 머지 요청을 보내겠습니다. 한 번 더 확인해 주시겠습니까?

1개의 좋아요

안녕하세요, 새로운 요구사항이 생겼습니다.
현재 특정 국가 몇 곳만 접근을 허용하고, 대부분의 국가에는 접근을 제공하지 않으려고 합니다. 그렇다면 geo_blocking_country_region_allowlist와 유사한 설정을 추가해야 하는지 궁금합니다. 이 설정이 존재하면 사용자가 해당 범위에 속하는지 판단하여, 속해 있으면 통과시키고 그렇지 않으면 차단하는 방식입니다.
geo_blocking_country_region_blocklist와 geo_blocking_country_region_allowlist가 동시에 설정된 경우에도 geo_blocking_country_region_allowlist만 판단하고, 그렇지 않을 경우 geo_blocking_country_region_blocklist를 판단합니다.

현재 기능과 하위 호환성을 유지하기 위해 다음을 수행하면 PR을 환영합니다:

“허용 목록을 제외한 모든 것 차단”이라는 추가 설정을 추가하고, 해당 설정이 활성화된 경우에만 설명하신 대로 동작하도록 합니다.