Loading an iframe in Ionic 7 react

I have an Ionic react app, which loads an website in iframe.
This is working as expected when running ionic serve in browser but after deploying to android it is showing an error “502 bad gateway”.

Do i need to enable any thing on android to get this working ?

dev.example.com is trying to load qe.example.com in Iframe.

we are using Ionic 7, react 17, and capacitor.