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

    Skye

    02/14/2023, 10:48 AM
    Or in the dashboard you can just toggle it
  • m

    Mees

    02/14/2023, 10:49 AM
    Thanks a lot!
  • t

    Tomleads

    02/14/2023, 11:02 AM
    Hello. I am deploying to Cloudflare Pages via a Github action. Once it has finished, the last part of the output is
    :sparkles: Deployment complete! Take a peek over at https://randomnumber.mydomain.pages.dev
    Is it possible to get that url set as an environment variable so I can use it in a further step. Appreciate this may be more of a Github Action question but also wondered if there was a CLI option when using the command
    pages publish public
    ? Thanks
  • e

    Erisa | Support Engineer

    02/14/2023, 11:08 AM
    If you use pages-action () it will provide the
    url
    as an output of the action, see the "Outputs" section at the bottom of the readme
  • j

    JatinGundabathula

    02/14/2023, 11:11 AM
    will setting
    cacheLevel
    to
    bypass
    work ?
    Copy code
    Sample code:
    await fetch(request, {
        cf: {
          cacheKey,
          cacheLevel: 'bypass'
        },
      });
  • h

    HardAtWork

    02/14/2023, 11:19 AM
    No, because any modifications you make with the Fetch Cache API are only applied on subsequent requests. The regular Cache API supports modifications on the first request, which is why I recommended it
  • t

    Tomleads

    02/14/2023, 11:26 AM
    oooh thanks. I am currently using https://github.com/cloudflare/wrangler-action I'll try your suggestion
  • t

    Thỏ

    02/14/2023, 11:46 AM
    Hi all, my worker exceed CPU startup time. How do I increase it? I have test with AWS Lamda, startup time is about 2000ms. Other event is below 5ms
  • t

    Thỏ

    02/14/2023, 11:47 AM
    But aws lamda is unicast and not friendly to debug :))) so I prefer Cloudflare worker
  • h

    HardAtWork

    02/14/2023, 11:50 AM
    You can’t increase startup time. At the moment, what we recommend instead is to look at what you are doing at startup, and remove it where possible, or delay it if not
  • t

    Thỏ

    02/14/2023, 11:52 AM
    Thank you for your answer. Everything I have done is import ethers.js module and initialize its provider, when I remove it, everything works correctly
  • h

    HardAtWork

    02/14/2023, 11:53 AM
    Yeah, I’ve noticed that crypto-related packages are generally pretty bad when it comes to starting up fast.
  • t

    Thỏ

    02/14/2023, 11:54 AM
    Thank you, so sad to hear it so I think this problem can not solve, isn't it?
  • h

    HardAtWork

    02/14/2023, 11:55 AM
    Unless you want to write your own crypto library, then probably not...
  • t

    Thỏ

    02/14/2023, 11:59 AM
    Thank you so much
  • h

    HardAtWork

    02/14/2023, 11:59 AM
    No problem!
  • d

    dave

    02/14/2023, 2:27 PM
    How can I verify in my fetch handler that it's only being called by a fellow Worker in the same account through a service binding?
  • h

    HardAtWork

    02/14/2023, 2:35 PM
    You could add something to the
    cf
    object in the Request?
  • d

    dave

    02/14/2023, 2:39 PM
    Will
    cf.worker.upstream_zone
    be present for a service binding?
  • k

    kian

    02/14/2023, 2:40 PM
    That's apart of the ruleset engine only - rather than the
    cf
    object on a request
  • d

    dave

    02/14/2023, 2:40 PM
    oh
  • k

    kian

    02/14/2023, 2:40 PM
    Is the Worker you're calling ever called by anything other than the service binding?
  • d

    dave

    02/14/2023, 2:41 PM
    it shouldn't be; I'm trying to prevent a situation where somebody accidentally hits a button in the dashboard and publishes the Worker on a public route lol
  • k

    kian

    02/14/2023, 2:42 PM
    I was gonna say haha, just add no routes & disable workers.dev and you're basically done
  • k

    kian

    02/14/2023, 2:42 PM
    What HAW was saying is that if you do
    await env.FOO.fetch(url, { cf: { lol: true }});
    then
    req.cf.lol
    should be present on the
    FOO
    Worker
  • k

    kian

    02/14/2023, 2:42 PM
    at least that's how I recall it works
  • k

    kian

    02/14/2023, 2:42 PM
    one way to find out
  • s

    Skye

    02/14/2023, 2:42 PM
    yeah that's right
  • s

    Skye

    02/14/2023, 2:43 PM
    same as with wfp
  • k

    kian

    02/14/2023, 2:44 PM
1...226922702271...2509Latest