I have a question regarding a redirect (
302) that happens when accessing the
/admin panel of my Craft CMS application.
I've setup CloudFront for my app that runs on Craft 3. DNS points to CF (CNAME), CF has Elastic Load Balancer (ELB) as a default origin. The ELB is a subdomain on my main domain (for certificates reasons). There is a CNAME set for ELB on the main domain DNS.
Now, when I'm visiting any page on my application, there is no redirection happening (eg. when I go to www.myapp.com/product). Only when I'm visiting the /admin panel, I get redirected to the ELB domain. Eg. I go to www.myapp.com/admin and I get redirected to www.elb-domain.awsloadbalancerdomain.com (ELB's CNAME).
Any of you has any ideas about why this might be happening and how to prevent it?
Thank you in advance!