I am experiencing a bizarre connectivity issue to my react native application.
It appears I can connect to the API on one device but not the other, on the same network. Also the issue is intermittent, I usually can connect on both devices.
Observations so far
cache-control: no-cache
and in the response cache-control: no-cache, no-store, must-revalidate, private
. I only just did this though so not sure if it takes time for it to work since something might already be cached?The site is on an AWS EC2 instance, has letsencrypt SSL, laravel 5, nginx.
The issue ended up being due to conflicting DNS records. I had set up some DNS records on AWS Route53 but did not realise my domain provider also had some default records there when I bought my domain. The result being that sometimes it would use the correct records at AWS and sometimes it would use the nonsense records.
So to fix I deleted all the records at my domain provider. After some propagation time this fixed the issue. Hope this helps someone.