Cache not fragmented by protocol?
Hey all, we have a strange case where we route traffic through a worker to our origin, and the backend service listens on both HTTP & HTTPS endpoint, with the HTTP redirecting (301) to HTTPS. The problem we are seeing is that when a request comes for an asset through HTTP, our origin will respond with the 301 redirect, which will come back to the client through the worker and get cached. So far, I would say that everything makes sense. The problem is that when the client will request the asset through HTTPS (using the location we sent back), he will get back again a 301 REDIRECT response (through CF cache this time), which doesn't make much sense as the protocol is different from the previous request. This ends up in endless redirect loop. Is this a known behaviour? I couldn't find any info online.
4 Replies
What’s your SSL setting?
SSL on that zone is set on 'Flexible'
That might be the issue. When the browser shows HTTPS, then it is still hitting your origin with HTTP. Your origin then responds with a redirect to HTTPS, causing the loop
Try setting your SSL setting to Full
Thanks for your input @HardAtWork, I will do some tests and get back with any findings 🙂