Add wildcard top and/or second level domains to whitelist for inclusion

I did some testing and don’t think this works, but would it be possible to add wildcard top and/or second level domains capability to the whitelist for acceptable registered user emails?

For example:

*.gov
*.custom.gov
*.mil
*.custom.mil

or some variation of this? Thanks!

Wildcard support was added to blacklist 11 hours ago by @techAPJ :
https://github.com/discourse/discourse/commit/220b9c5abe561a8bed3192b54472f7c347bdda55

There was no mention of whitelist in the discussion or commit.

2 Likes

Speaking as someone who doesn’t use the whitelist … if I did, I don’t think that I would want it to automatically allow all subdomains in the same way that the blacklist now automatically blocks all subdomains.

I don’t think that full regex is needed, just a simple marker.

If I were programming it (and I am a programmer, just not in any language used by Discourse), I would probably make it so that example.com is an exact match, and .example.com matches example.com plus subdomains.

2 Likes

Hey @kensims, not looking for it to do it automatically, but by using some differentiating annotation (like your example below), it should be a capability, not a default. Thanks!