https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • r

    Rodney

    12/15/2020, 4:12 AM
    Help: Is there any reason why we would get 1015 Rate Limiting on an Enterprise account for an Edge Worker when requested directly via https://workername.accountname.workers.dev/
  • r

    Rodney

    12/15/2020, 5:03 AM
    There's only 1 subrequest per request - so not that. We also tried pointed it at vanilla worker (https://front-url.bunnings.workers.dev/) with no fetch / sub-request, and are getting - Remote host closed connection during handshake it seems like there's WAF/Attack protection (where our load-testers may have been identified as a bad-actor) which is rate-limiting
  • a

    albert-zhao

    12/15/2020, 5:08 AM
    Hmm let me look into this and DM you
  • k

    kenton

    12/15/2020, 5:24 AM
    This sounds like our anti-abuse measures fired -- they often misclassify load tests as abuse, unfortunately. These measures don't apply to enterprise zones, but workers.dev subdomains aren't currently recognized as enterprise for this purpose. Support can disable anti-abuse on request, or alternatively you can do your load test on your real (enterprise) domain. Note also, though, that for a realistic load test, you should make sure you have test clients running spread out around the world, not all in one place. Cloudflare's network is designed to handle distributed traffic.
  • r

    Rodney

    12/15/2020, 5:33 AM
    Thanks Kenton! We're needing to use workers.dev domains to avoid the EW to EW issues. Is it possible to apply this at an Account level?
  • k

    kenton

    12/15/2020, 5:37 AM
    It's currently implemented only as a per-zone setting. But I just turned it off for your workers.dev zone so you should be good to go.
  • r

    Rodney

    12/15/2020, 5:37 AM
    Thank you @User !
  • l

    Levi

    12/15/2020, 8:02 PM
    How do you all write code for your cron triggers/scheduled events? Do you write the code, publish, and hope it works?
  • c

    CodeCo

    12/15/2020, 8:08 PM
    There's a test schedule button inside the quick editor.
  • l

    Levi

    12/15/2020, 8:09 PM
    thank you very much
  • c

    CodeCo

    12/15/2020, 8:10 PM
    Np
  • a

    ai

    12/15/2020, 8:30 PM
    You can also write a
    fetch
    entrypoint for wrangler dev testing. In your wrangler.toml
    Copy code
    toml
    [env.dev]
    workers_dev = true
    vars = { env = "dev" }
    Then in your script at the top level:
    Copy code
    js
    if (env == "dev") {
        addEventListener("fetch", event => {
            /* call the scheduled code */
        })
    }
  • a

    ai

    12/15/2020, 8:31 PM
    Then just call it with curl or something to make sure it works properly.
  • l

    Levi

    12/15/2020, 8:31 PM
    interesting
  • l

    Levi

    12/15/2020, 8:31 PM
    nice approach, thank you
  • l

    Levi

    12/15/2020, 8:35 PM
    instant results makes this so much easier lol
  • d

    davidbarratt

    12/16/2020, 3:39 PM
    Question... it looks like APO for Wordpress uses a Cloudflare worker? If so, could I just deploy the worker myself? https://support.cloudflare.com/hc/en-us/articles/360049822312-Understanding-Automatic-Platform-Optimization-APO-with-WordPress
  • k

    kristian

    12/16/2020, 4:28 PM
    my understanding is that it's an improvement on some open-source work we had a few years ago around custom workers + WP caching, as for whether it's open-source, i'm not sure
  • k

    kristian

    12/16/2020, 4:29 PM
    I think the WP plugin is open-source here https://github.com/cloudflare/Cloudflare-WordPress but the worker is probably maintained internally
  • d

    davidbarratt

    12/16/2020, 4:31 PM
    yeah that makes sense. I started working on a Worker for any Drupal site and I was going to go make one for WordPress too, but I realized that it probably already exists, just isn't open source. 😦
  • c

    catgirl

    12/16/2020, 5:45 PM
    @davidbarratt let’s take this to general so we aren’t spamming intros though
  • d

    davidbarratt

    12/16/2020, 5:47 PM
    I can poke around about NC if you're really interested and see if I can get specifics
  • c

    catgirl

    12/16/2020, 5:49 PM
    Yeah I’m interested
  • c

    catgirl

    12/16/2020, 5:50 PM
    I voted libertarian but we lost 😭
  • c

    catgirl

    12/16/2020, 5:50 PM
    Was hoping for more loose alcohol laws
  • d

    davidbarratt

    12/16/2020, 6:30 PM
    > There is beer available in NC, it’s an alcohol control state so no hard stuff/spirits- they may only be covered by ground shipping and those stores don’t often ship beer
  • c

    catgirl

    12/16/2020, 7:27 PM
    That’s unfortunate. I keep voting libertarian but boomers get elected instead 😭
  • i

    itsmatteomanf

    12/17/2020, 2:01 PM
    Yayyy! Reading it now 😉
  • a

    adaptive

    12/17/2020, 2:01 PM
    https://blog.cloudflare.com/cloudflare-pages/
  • i

    itsmatteomanf

    12/17/2020, 2:01 PM
    https://blog.cloudflare.com/cloudflare-pages/
1...202122...2509Latest