Coming across a bit of a strange issue with Laravel in dev and production environments. We have modified the APP_ENV variable in .env file in Laravel on production server to prod.domain.com. We’ve noticed that some requests were not going through at all, and from the requests that were going through, some were being accepted unauthorized. We checked everything against the dev environment (where everything is working properly) and noticed that the APP_URL was prod.domain.com, whereas it should’ve been dev.domain.com. When we changed it to what it should be, the same problem started happening on dev. So now on dev, we changed this to prod.domain.com and on production we set APP_URL to dev.domain.com and all seems to be working properly, even though APP_URL is pointing to different hosts.
What could be a cause for that?