Preventing DDoS on a Discourse instance?

Create a page rule which looks like this:

That will disable everything that can tamper with the code today, and in the future.

If you want to create a caching rule for /uploads/ to save some server transfer that’s fine too.