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

    mekpans

    05/05/2023, 3:55 PM
    Haven't used alarms yet but sounds like it will give me what I need.
  • m

    mekpans

    05/05/2023, 3:55 PM
    Sounds perfect.
  • s

    sathoro

    05/05/2023, 3:57 PM
    we just released a feature that uses this for a queue in production yesterday. been working well
  • s

    sathoro

    05/05/2023, 3:58 PM
    ah but DOs get evicted when you deploy the worker. so you definitely need some retrying built in
  • s

    sathoro

    05/05/2023, 3:58 PM
    that's the biggest downside
  • m

    mekpans

    05/05/2023, 3:59 PM
    ok that's interesting... it's the retry/trigger functionality I really need
  • m

    mekpans

    05/05/2023, 4:00 PM
    I have a bit of work that needs to be pushed along by something
  • r

    ReShop

    05/05/2023, 4:27 PM
    Hello, so I’m trying to redirect (using windows hosts file) a website protected by cloudflare to point to my cloudflare worker. But both of these sites use the same ip (both under cloudflare, lol) so the redirection is not working. Any ideas?
  • r

    ReShop

    05/05/2023, 4:27 PM
    I cannot get a different/real IP for either, and i think this is by design
  • k

    kian

    05/05/2023, 4:31 PM
    Workers just operate on DNS so yeah, it'll be hostname & path based
  • k

    kian

    05/05/2023, 4:31 PM
    You can't use an IP address to hit the Worker vs a traditional origin
  • k

    kian

    05/05/2023, 4:31 PM
    You can only 'bypass' Cloudflare entirely by setting up DNS to go to the real IP
  • r

    ReShop

    05/05/2023, 4:47 PM
    So you’re saying i should edit my routers dns to redirect it?
  • r

    ReShop

    05/05/2023, 4:47 PM
    on my end
  • r

    ReShop

    05/05/2023, 4:47 PM
    and theres nothing i can do on the other end?
  • x

    xnslx

    05/05/2023, 5:10 PM
    Is it possible to see some real time building logs like Vercel in Cloudflare workers? I fail to deploy my application and very hard to debug.
  • u

    Unsmart | Tech debt

    05/05/2023, 5:12 PM
    In Cloudflare workers your CLI is the build logs. In Cloudflare pages if you are using the git integration there is a build log.
  • x

    xnslx

    05/05/2023, 5:18 PM
    There is no error in the terminal. Is there any wrangler cli that can see the logs?
  • w

    Walshy | Pages

    05/05/2023, 5:22 PM
    There is no "build" really for Workers
  • w

    Walshy | Pages

    05/05/2023, 5:22 PM
    i'm assuming you're getting an exception in production so this is a runtime error?
  • w

    Walshy | Pages

    05/05/2023, 5:22 PM
    if so,
    wrangler tail
  • n

    NodSaibot

    05/05/2023, 5:34 PM
    Was the 'export default' async fetch method of workers removed?
  • n

    NodSaibot

    05/05/2023, 5:34 PM
    adjusting code on one worker but suddenly it wont compile because of this line
    export default {
  • w

    Walshy | Pages

    05/05/2023, 5:37 PM
    it was not
  • w

    Walshy | Pages

    05/05/2023, 5:37 PM
    what's the error you're getting?
  • n

    NodSaibot

    05/05/2023, 5:39 PM
    Uncaught SyntaxError: Unexpected token 'export' at worker.js:20 (Code: 10021)
  • w

    Walshy | Pages

    05/05/2023, 5:42 PM
    what's the code?
  • c

    Cronus

    05/05/2023, 5:47 PM
    Hi There Walshy, im working with NodSaibot on this, i'll show you the code sec
  • c

    Cronus

    05/05/2023, 5:48 PM
    Copy code
    export default {
      async fetch(request, env) {
        if (!authorizeRequest(request, env)) {
          return new Response('Forbidden', { status: 403 });
        }
        
        const body = await request.text();
        const requestingIP = String(request.headers.get('CF-Connecting-IP'));
        var parsedBody;
  • c

    Cronus

    05/05/2023, 5:48 PM
    old code above
1...243824392440...2509Latest