Skip to content

Cloudflare Setup

Uncategorized
3 3 3
  • Hi all,

    We've been using Cloudflare for a while now and atm we are in the free tier if that helps(and have turned off acceleration).

    Since like last week we've seen a sudden hike in requests to the point where the server cannot handle it anymore.

    c565cb7d-b40f-4e4c-8c34-1ef344883e6c-image.png

    These should be AI crawlers and we're trying to limit access to them but they seem to crawl into the forum somehow.

    While we would want non-logged-in users/visitors to see the content, since no one can use the site anymore we have decided to only let in logged-in users without checks and for others, for a human check to go through.

    The following is the rule we're using to identify logged in/actual users:

    19bebf17-9484-4b47-93cf-cb9eec823add-image.png

    I was wondering if there is a better/more standardised/more accurate way to identify logged in users.

    Thanks very much!

  • Hi all,

    We've been using Cloudflare for a while now and atm we are in the free tier if that helps(and have turned off acceleration).

    Since like last week we've seen a sudden hike in requests to the point where the server cannot handle it anymore.

    c565cb7d-b40f-4e4c-8c34-1ef344883e6c-image.png

    These should be AI crawlers and we're trying to limit access to them but they seem to crawl into the forum somehow.

    While we would want non-logged-in users/visitors to see the content, since no one can use the site anymore we have decided to only let in logged-in users without checks and for others, for a human check to go through.

    The following is the rule we're using to identify logged in/actual users:

    19bebf17-9484-4b47-93cf-cb9eec823add-image.png

    I was wondering if there is a better/more standardised/more accurate way to identify logged in users.

    Thanks very much!

    Since you are on Cloudflare, do you have their Block AI bots rules on?
    They seem to help.

  • Since you are on Cloudflare, do you have their Block AI bots rules on?
    They seem to help.

    D1re_W0lf those rules do not seem to help, I have enabled them as well.

    yasas we have been seeing the same behaviour starting perhaps a week ago. The bursts seem to happen for maybe half a day and then disappear.

    Since we wanted the site to start working quickly, we opted for an allow-list approach. We turned on "I'm under attack" mode, which has some unfortunate side effects (namely, causing federation to stop).

    These are our rules:

    (any(http.request.headers["accept"][*] eq "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"")) or (any(http.request.headers["accept"][*] eq "application/activity+json")) or (http.request.method eq "POST" and starts_with(http.request.uri.path, "/inbox")) or (starts_with(http.request.uri.path, "/assets")) or (starts_with(http.request.uri.path, "/.well-known"))
    

    This lets (respectively):

    1. ActivityPub fetches
    2. Same
    3. ActivityPub publishes to the NodeBB inbox
    4. Static assets
    5. Certbot and webfinger (also for AP)

Diese Artikel könnten Dich auch interessieren.