APO works incorrectly when routing worker is active
Hi all, I hope you can help me to fix the following issue: it looks like APO fails to work correctly when the routing worker is enabled
A bit of background: in order to comply with local regulations in Ukraine we implemented a worker which redirects/re-writes the URL for users in Ukraine. This solution worked well along with APO and ARGO until recently we noticed an increased page loading time, and failure to Verify APO works (using this instruction https://developers.cloudflare.com/automatic-platform-optimization/get-started/verify-apo-works/)
In our case:
cf-edge-cache is cache,platform=wordpress
but
cf-cache-status is BYPASS
and
cf-apo-via is origin,miss (not tcache)
The moment I disable the routing via the worker all works as expected (all 3 checks pass), but that’s a bit strange as the worker should trigger redirect only for users in Ukraine
Please find the worker's code in the Community thread https://community.cloudflare.com/t/how-to-make-apo-work/773362/3
I would be very grateful if someone could advise what's wrong here and how I can fix the issue (which didn't exist previously)
Many thanks,
Igor

2 Replies
any ideas guys?
I switched to a default theme and turned off most of the plugins and the only caching-related difference was MISS instead of BYPASS https://prnt.sc/9nSnUtfk1fLs
Feeling frustrated