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

    Vero 🐙

    04/05/2023, 5:05 PM
    Hey @SeriousMax3. There is no early access or open beta for that yet
  • s

    Spoleto

    04/05/2023, 5:08 PM
    If I access domain.com/?gclid the cookie is not applied. If I hard refresh, the cookie is applied. Any advice??
    Copy code
    if (url.searchParams.has('gclid') I| url.searchParams.has('fbclid') || url.searchParams.has('bing') || url.searchParams.has ('usg') |1
    url.searchParams.has ('attribute') |1
    url.pathname.toLowerCase () === '/walk-in-tub-pricing/' |1 country != 'US') §
    response.headers.append(
    "Set-Cookie".
    "pricing-mode=on;max-age=604800; Path=/"
    )
    }
  • s

    Spoleto

    04/05/2023, 5:08 PM
    However, "url.pathname.toLowerCase()" does not require hard refresh at all and works on first page load
  • a

    altryne

    04/05/2023, 8:27 PM
    Folks, I need help to debug an issue. I'm sending stripe webhooks to a worker Stripe records show that webhook was delivered OK Inside the worker, on invoice.paid I update supabase with some user credits. I've noticed that sometimes, even though webhooks shows ok, the credits don't update. However, rerunning the webhook from stripe, usually works 100% I've no idea how to debug this, and would love some ideation help.
  • d

    dave

    04/05/2023, 8:50 PM
    wrangler tail
  • a

    altryne

    04/05/2023, 8:52 PM
    Thanks, familiar with tail, but since this happens async, and I can't have tail running 24/7 on production, as it disconnects, not sure how this helps me to debug
  • h

    HardAtWork

    04/05/2023, 8:52 PM
    LogPush?
  • a

    altryne

    04/05/2023, 8:54 PM
    I was thinking of setting this up honestly, not sure entirely how to do that, with logtail (which... supposedly supports workers) But even then, this will help me with logging right? There doesn't seem to be an error, I just get 200 back in stripe.
  • d

    dave

    04/05/2023, 8:54 PM
    logpush and/or use mailchannels
  • a

    altryne

    04/05/2023, 8:56 PM
    mailchannels? what's that
  • c

    Chaika

    04/05/2023, 8:57 PM
    Adding more logging (Sentry, Logpush, etc) isn't a bad idea, the root issue though is likely one of these two things: 1.Your worker is suppressing/swallowing the error and returning 200 to Stripe. (If the worker errored out, and returned an error to Stripe, Stripe would retry) 2. Supabase is somehow erroring out and not throwing an exception. Perhaps an issue with your query, or something else? I'm not familiar with Supabase, but generally with SQL Clients you can check if the query executed successfully and the amount of rows it affected
  • c

    Chaika

    04/05/2023, 8:59 PM
    I believe if you return information to Stripe, Stripe will let you see that information later in their dashboard. You could perhaps return some debug information as well
  • e

    embed

    04/05/2023, 9:35 PM
    Hey all, what should I do if I believe I got DDoSed? Got a random spike of 300 rps that ended up in over a million requests to my worker.
  • e

    embed

    04/05/2023, 9:36 PM
    Way over normal levels (as seen by the graph 💀)
  • u

    Unsmart | Tech debt

    04/05/2023, 10:05 PM
    you should attempt to block requests using firewall rules and/or rate limiting rules
  • a

    altryne

    04/05/2023, 10:10 PM
    you're the best! I haven't considered returning... the info! Thank you
  • w

    wedtm

    04/05/2023, 10:29 PM
    Is this comment in the Durable Objects blog post referring specifically to the storage API or can I rely on Durable Object class members to be concurrency safe as well?
  • z

    zegevlier

    04/05/2023, 10:31 PM
    The object (so same class and same ID) is entirely single-threaded, so if I understand you correctly, yes!
  • u

    Unsmart | Tech debt

    04/05/2023, 10:31 PM
    Technically it depends assuming that is the blog I think reading the rest will make that more clear
  • u

    Unsmart | Tech debt

    04/05/2023, 10:32 PM
    It depends in what way you mean also
  • h

    HardAtWork

    04/05/2023, 10:32 PM
    And technically, if you generate the same ID twice in rapid succession, it is theoretically possible to have two DO instances with the same ID
  • h

    HardAtWork

    04/05/2023, 10:33 PM
    But that’s quite rare
  • w

    wedtm

    04/05/2023, 10:35 PM
    Excellent! Thank you all!
  • s

    Spoleto

    04/05/2023, 10:36 PM
    response.headers.append("Cache-Control", "no-cache, no-store, must-revalidate");
  • e

    embed

    04/05/2023, 10:42 PM
    they're all different ips that all look like normal requests
  • d

    dave

    04/05/2023, 11:24 PM
    so not gonna give a ton of details to avoid dox'ing our infrastructure setup.. for infrequent (but important) webhooks, we log and store the raw data.
  • c

    chientrm

    04/06/2023, 8:40 AM
    is
    fetch
    cacheTtl disabled when using
    wrangler dev
    ? 🤔
  • c

    chientrm

    04/06/2023, 9:49 AM
    I use
    fetch
    from my worker to my external api (proxied via tunnel - orange cloud).
  • c

    chientrm

    04/06/2023, 9:50 AM
    cf: { cacheTtl: 300, cacheEverything: true }
    but it doesn't cache anything 😐
  • c

    chientrm

    04/06/2023, 10:00 AM
    oh, cache doesn't work with
    workers.dev
    🤦‍♂️
1...237923802381...2509Latest