Ability to Block Discourse Access from Geographic Regions or Countries

Technically now that we ship the maxmind db out of the box, this kind of feature would only take a few weeks to build.

Caveats being:

  1. NGINX would not do any blocking so “anon requests” would unconditionally have to be funneled through the app which would cause perf issues.

  2. CDN support would be tricky, most CDNs out there don’t support a mechanism for this so it is likely you would not be able to use most CDNs.

I don’t see us building this though cause it goes against a lot of our principles. Closet feature I can see us building is “self service, best effort strong IP block” (aka. if your IP matches list then application will return an access denied prior to walking through all the app code) cause this can allow all sorts of forums to protect themselves a bit better against abuse beyond the rate limiting we ship.

If you really really deem that you need this, why not drive all your traffic via cloudfront and have it do it for you?

2 Likes