worker runs request that goes into different subdomain

I have relatively simple worker - for proxying and caching. It was setup to replace old system.
  • let's say it's on domain staging.x.ltd (this domain in CF is cached and pointing to our legacy system in dns record)
  • worker for most types of request it works and proxies requests mostly to prod.x.ltd domain (new system to replace legacy)
  • somehow for some requests like to /api/auth/callback/google I'm receiving response from legacy system
    in worker logs I'm printing headers and url it passes to proxy - they all are ok - pointing to prod.x.ltd
    but response I'm getting from legacy and even cached
    age: '1090',
    'cache-control': 'public, max-age=300',
    'cf-cache-status': 'HIT',
    'cf-ray': '9ac5e3e7143ccbfe-WAW',
could someone help me looking into that?
Or - when, if I have worker on domain, I can get response from origin even though I see worker was run?
Was this page helpful?