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

    Keizer

    03/22/2023, 1:29 AM
    The .text() was what I needed
  • k

    Keizer

    03/22/2023, 1:30 AM
    The only different between .body and .text() is .text() returns a Promise >_<
  • c

    Chaika

    03/22/2023, 1:34 AM
    Well there's a much bigger difference then it just returning a promise, body returns a ReadableStream, which if you return from your worker for example allows the response to be streamed through the worker to the requester. Text returns a promise that resolves to a string of the object's value. But yea, glad you got it working!
  • k

    Keizer

    03/22/2023, 1:34 AM
    Yes, I have been super excited to do a site in CF Workers and that was infuriating me
  • k

    Keizer

    03/22/2023, 1:35 AM
    I got to the point of object data being ReadableStream but then I was like is that even supported in the CF EcmaScrip lol
  • r

    renzor

    03/22/2023, 2:39 AM
    has anyone ran into this error when fetching a site enforcing TLS 1.3
    Copy code
    OpenSSL error; message = error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION
  • s

    sirhype

    03/22/2023, 2:54 AM
    Anyone that has used Mailchannels, how reliable is it? I'm going to be sending out 10s of emails and it's not really worth it for me to subscribe to a paid service for this purpose at this time. I was going to use Google Apps API to just send emails, but realized that won't work on Workers.
  • k

    Keizer

    03/22/2023, 3:08 AM
    Chaika, how to I turn off the CF worker output inspection? I have my template files loading but now it's tell me when I have a incorrect tag ending LMAO!!
  • k

    Keizer

    03/22/2023, 3:08 AM
    I fixed all the HTML issues but now it's looking at my JS like it's HTML and saying I am not using htmlentities....
  • k

    Keizer

    03/22/2023, 3:09 AM
    Need to disable that
  • c

    Chaika

    03/22/2023, 3:13 AM
    Workers don't have anything like that, at least in prod. Sounds like a mustache thing
  • c

    Chaika

    03/22/2023, 3:14 AM
    Maybe one of the local testing environments (miniflare) has that? I wouldn't think they would though
  • c

    Chaika

    03/22/2023, 3:18 AM
    https://github.com/janl/mustache.js/blob/972fd2b27a036888acfcb60d6119317744fac7ee/mustache.js#L141 Looks like it is indeed a mustache thing
  • k

    Keizer

    03/22/2023, 3:18 AM
    Hmmm, I completely removed it lol
  • c

    Crazy Rabbit

    03/22/2023, 7:22 AM
    Is this the right way to cache image from R2?
  • c

    Crazy Rabbit

    03/22/2023, 7:23 AM
    I'm getting server 500 error, but logs doesn't show any error.
  • c

    Crazy Rabbit

    03/22/2023, 7:26 AM
    Copy code
    1. Try to get banner from cache
    2. Try to get banner from R2
    3. Try to get default banner from cache
    4. Try to get default banner from R2
  • c

    Crazy Rabbit

    03/22/2023, 7:37 AM
  • c

    Crazy Rabbit

    03/22/2023, 9:28 AM
    Issue has been solved.
  • c

    Crazy Rabbit

    03/22/2023, 9:36 AM
    I mean not competently but I'm really close.
  • t

    Tom Sherman

    03/22/2023, 9:38 AM
    TIL about super reactions lol
  • k

    kian

    03/22/2023, 9:40 AM
    wtf
  • c

    Crazy Rabbit

    03/22/2023, 9:43 AM
    Looks cool
  • s

    Skye

    03/22/2023, 9:57 AM
    #812577823599755274
  • c

    Crazy Rabbit

    03/22/2023, 10:01 AM
    Now cache works but the first (uncached) request does not.
  • c

    Crazy Rabbit

    03/22/2023, 10:01 AM
    Bet It has to do something with Streams and cloning.
  • c

    Crazy Rabbit

    03/22/2023, 10:02 AM
    As here I'm using banner.body 2 times.
  • s

    Skye

    03/22/2023, 10:02 AM
    Yes, that's why
  • c

    Crazy Rabbit

    03/22/2023, 10:41 AM
  • c

    Crazy Rabbit

    03/22/2023, 10:41 AM
    clone provide me with an error
1...235223532354...2509Latest