#worker runs request that goes into different subdomain

3 messages · Page 1 of 1 (latest)

sullen aspen
#

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?

sullen aspen
#

I think I got it. When on subdomain subdomain STAGING in worker I was executing fetch to domain PROD, redirect Location was returned with STAGING url - so for some reason worker would follow it to origin behind that domain

#

Bit unexpected for me, since in front of domain there's worker, so why requests from worker to that domain are passed to origin