Problem with multiple Workers bound to Workers Rou...
# workers-help
d
I have a following routes table: 1.
api.example.com/path-a/*
->
worker-a
2.
api.example.com/path-b/*
->
worker-b
3.
api.example.com/path-c*
->
worker-c
Every worker has a following setting in `worker.toml`:
Copy code
[env.production]
name = "worker-a"
route = { pattern = "api.example.com/path-a/*", zone_name = "example.com" }
I fail to access these workers over HTTP. Looks like I'm missing something, help me out
Whenever I publish a worker, here's what Wrangler prints me out:
Copy code
Published worker-a (1.36 sec)
105  api.example.com/path-a/* (zone name: example.com)
s
When you have
/some-path/*
, it will match things under some-path, for example
/some-path/foo
, but won't match
/some-path
What you probably want is
/path-a*
,
/path-b*
etc
d
agreed, however even if i send a request that complies with my route pattern, still no answer
s
Do you have a specific link I could see?
d
sure: [REDACTED]
s
And I'm guessing that JSON response isn't from the worker?
d
well, worker should indeed output with JSON
however, it is definitely unaccessible at least from my machine -__-
s
What are you seeing when you visit it?
d
a simple cURL results in a
curl: (6) Could not resolve host: [REDACTED]
s
I'm guessing you have some kind of old DNS record cached
Or perhaps just curl being broken, that happens to me often on windows (won't resolve anything, but any other tool will do it fine)
d
damnit. I really tried to send a request over my phone and...it works
s
All good then? 🙂
d
yep, thank you!