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

    kian

    02/18/2023, 7:32 PM
    so you are probably bouncing between them
  • c

    Crazy Rabbit

    02/18/2023, 7:32 PM
    Thanks
  • c

    Crazy Rabbit

    02/18/2023, 7:35 PM
    can I duplicate 3 or more streams?
    Copy code
    js
    const [v1, v2, v3] = message.body.tee();
  • w

    Walshy | Pages

    02/18/2023, 7:35 PM
    No. tee returns an array of 2
  • k

    kian

    02/18/2023, 7:35 PM
    idk if you can tee a tee'd stream - but then you have 4 streams
  • k

    kian

    02/18/2023, 7:36 PM
    which need to be read in parallel otherwise it'll buffer the body into memory which is Not Ideal™️
  • d

    Dani Foldi

    02/18/2023, 7:36 PM
    couldn't you tee just one of the tee'd ones to get (1+1)+1 ?
  • c

    Crazy Rabbit

    02/18/2023, 7:37 PM
    It would be ideal to read TTL from JSON and use the same amount when I will cache it.
  • k

    kian

    02/18/2023, 7:37 PM
    this is true
  • c

    Crazy Rabbit

    02/18/2023, 7:38 PM
    or I can just leave it at 60s
  • c

    Crazy Rabbit

    02/18/2023, 7:39 PM
    so all DNS records will by default be cached for 60s
  • w

    Wichard

    02/18/2023, 7:40 PM
    what ntp server do workers use? I want to do some latency benchmarks against one of my servers
  • k

    kian

    02/18/2023, 7:40 PM
    Probably
    time.cloudflare.com
    - but that's just a guess
  • w

    Wichard

    02/18/2023, 7:41 PM
    that would make sense... thanks!
  • d

    dave

    02/18/2023, 7:52 PM
    @kian How did you figure out
    key_base64
    was a valid thing? I don't see it anywhere in workerd.
  • k

    kian

    02/18/2023, 7:54 PM
    undercover informant
  • k

    kian

    02/18/2023, 7:54 PM
    also known as someone posted it here when we were looking into the binding
  • d

    dave

    02/18/2023, 7:54 PM
    ahh
  • d

    dave

    02/18/2023, 8:02 PM
    Copy code
    text: 'Uncaught DOMException(SyntaxError): Attempt to import public ECDSA key with invalid
      usage "sign".\n' +
  • d

    dave

    02/18/2023, 8:02 PM
    do you know how to import ECDSA keys?
  • d

    dave

    02/18/2023, 8:04 PM
    Example attempt:
    Copy code
    [[unsafe.bindings]]
    type = "secret_key"
    name = "MY_PUBLIC_KEY"
    format = "raw"
    algorithm = { name = "ECDSA", namedCurve = "P-256" }
    usages = ["verify"]
    key_base64 = "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEOqTOCq7owLMNsc9KgOpeAxf8GjGFT0DTgGpG/kvRsJDoK028OgGKGsE2luvFW8GnX3tktNsmushChshNzeem8g=="
  • d

    dave

    02/18/2023, 8:07 PM
    oh I think I got it..
  • d

    dave

    02/18/2023, 8:07 PM
    format = "raw" was wrong
  • d

    dave

    02/18/2023, 8:30 PM
    yay it works
  • a

    altryne

    02/18/2023, 9:27 PM
    hey folks, any update on this bug? It's seriously blocking us from going to production, we can't do service bindings, and we have to do a worker to worker communication!
  • c

    Crazy Rabbit

    02/18/2023, 9:31 PM
    can ReadableStream be stored in Cache API?
  • c

    Chance

    02/18/2023, 9:37 PM
    How can I upload files to my worker project via Cloudflare.com
  • c

    Crazy Rabbit

    02/18/2023, 9:37 PM
    It's working without Cache API, but not with. So I think it has to do something with storing ReadableStream to Cache API.
  • c

    Cyb3r-Jok3

    02/18/2023, 9:38 PM
    I believe cache API only works with response objects
  • k

    kian

    02/18/2023, 9:38 PM
1...228422852286...2509Latest