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

    Jordan (UNCVRD)

    02/18/2023, 12:49 AM
    Hi! Ok just need some quick confirmation, but do I understand correctly that we are unable to map multiple workers to the same domain but on different paths? For example, I have several queue workers that I need to keep separate and I'd like to map to: - cfw.mydomain.com/send-email -> points to my send-email cfw - cfw.mydomain.com/send-text -> points to my send-text cfw I am unable to do that...right? Since they'd run separate snippets of code. Instead I would need to configure the workers like this: - send-email.mydomain.com -> points to my send-email cfw - send-text.mydomain.com -> points to my send-text cfw It would be nice if the first option is possible because I need to pass the URL to a proxy and I'd like to not have to create several proxy rules that are essentially identical except for the upstream url (aka *.mydomain.com) Just wanted to check, thanks!
  • c

    Chaika

    02/18/2023, 12:56 AM
    You shouldn't have any issue doing that with HTTP Routes, under the Worker Routes tab of your zone, you just create the route exactly as is
    cfw.mydomain.com/send-email
    , select your service, and then repeat for the send-text worker. If you don't have an existing origin for cfw.mydomain.com, you'll need to create a record though to get traffic flowing through Cloudflare and hit your worker. Cloudflare recommends 100:: for Originless setups, that is, create an AAAA record on cfw.mydomain.com, target
    100::
    , proxied on.
  • c

    Chaika

    02/18/2023, 12:58 AM
    (When you're on the Worker Routes page you may see Forbidden 10007 errors, just ignore them and they won't hurt you, looks like that "bug" is still around)
  • j

    Jordan (UNCVRD)

    02/18/2023, 1:21 AM
    oh wow - yea I saw the error when I visited that page earlier and thought I was doing something wrong. Also had no clue about that 100:: record. Thanks so much for clarifying - I got this working using routes. Really appreciate it 🙂
  • d

    dave

    02/18/2023, 2:01 AM
    any way to avoid putting the raw key value in the wrangler.toml file? (For my current use-case, it's fine, but future ones.. eh 😛 )
  • d

    dave

    02/18/2023, 4:15 AM
    anyone ran into this issue before when trying to publish to npm?
    Copy code
    error An unexpected error occurred: "https://registry.yarnpkg.com/-/user/org.couchdb.user:aimoda: Auth rate limited".
  • d

    Deleted User

    02/18/2023, 4:17 AM
    https://www.githubstatus.com/incidents/t2xwk9mz56f4 might be related
  • d

    dave

    02/18/2023, 4:18 AM
    hmm but isn't npm unrelated?
  • d

    dave

    02/18/2023, 4:19 AM
    oh
  • d

    dave

    02/18/2023, 4:19 AM
    right
  • d

    dave

    02/18/2023, 4:19 AM
    it is
  • d

    dave

    02/18/2023, 4:19 AM
  • d

    dave

    02/18/2023, 4:19 AM
    yeah thank you, I'm tired and didn't put 2 and 2 together.
  • d

    Deleted User

    02/18/2023, 4:19 AM
    lol no worries
  • b

    Bidooo

    02/18/2023, 7:10 AM
    hello friends I created a worker with GDindex and I disabled " online player", but I received below banned as this How can I avoid this ban? & how can I fix it?
  • k

    kian

    02/18/2023, 8:47 AM
    Not other than some weird string manipulation at CLI
  • v

    Vonarian

    02/18/2023, 11:47 AM
    Hey Question: Can I run a function in my Cloudflare Workers service periodically to fetch data from another server, cache data and then in case of specific data from that another server, send a message to connected clients? I want to use WS here.
  • h

    HardAtWork

    02/18/2023, 12:08 PM
    A Cron Trigger?
  • v

    Vonarian

    02/18/2023, 12:10 PM
    Yeah I am looking into this. I'm not much of a JS dev, I only do Dart, so JS stuff, especially server code are strangers to me 😄 I think I need to add a schedule listener, fetch data and cache, then read from that data in my websocket stuff.
  • h

    HardAtWork

    02/18/2023, 12:11 PM
    Make sure you use the Module syntax(export default, rather than addEventListener), so that you don’t have to upgrade later
  • v

    Vonarian

    02/18/2023, 12:11 PM
    Aha, thanks 😄
  • s

    Spunkie

    02/18/2023, 3:38 PM
    Is there no way of pausing a worker temporarily, short of deleting all the routes?
  • h

    HardAtWork

    02/18/2023, 3:47 PM
    Deleting the Worker itself?
  • s

    Spunkie

    02/18/2023, 3:48 PM
    lol not really what I would call "pausing"
  • h

    HardAtWork

    02/18/2023, 3:49 PM
    I mean, if you are using wrangler, it is basically the same, other than the analytics being reset
  • s

    Skye

    02/18/2023, 3:50 PM
    last I checked you could delete and republish a worker and that stuff would stay
  • s

    sathoro

    02/18/2023, 3:50 PM
    wrangler delete
    ez
  • s

    sathoro

    02/18/2023, 3:51 PM
    I'm setting up my first worker service binding. for local dev do I need to have the bound service running with wrangler too?
  • s

    sathoro

    02/18/2023, 3:51 PM
    I tried without and it is
    undefined
  • s

    sathoro

    02/18/2023, 3:52 PM
    without
    --local
    it does work but then my durable objects won't work
1...228022812282...2509Latest