My frontend and backend work normally in every browser, and the same application also works when I emulate a phone in Chrome. However, requests sent while using Firefox's phone emulation immediately return a 504 Gateway Timeout. The identical request succeeds in another browser tab. The services run on Kubernetes behind Istio using a VirtualService and Gateway with otherwise standard routing. What could cause Firefox's emulated requests to fail this way?
2 Answers
Compare the complete Firefox and Chrome requests, including headers, protocol details, and whether either one uses SSL differently. Firefox may be sending something that the proxy handles differently. It’s also worth checking for an OPTIONS preflight, although if no OPTIONS request is being sent, focus on the actual request and the Envoy logs rather than CORS.
An immediate 504 usually means the response is being generated by the Istio or Envoy proxy rather than by the backend timing out. Check the istio-proxy access log for the exact request and inspect Envoy’s response flag, such as UC, UF, or NR. That can show whether the route was not matched, the upstream connection failed, or the request was rejected before reaching the service.

I checked for a preflight request, but Firefox isn’t sending an OPTIONS request in this case.