I'll try to explain my situation and issue as best as I can.
Previously I had a wordpress site behind cloudfront. Set up behaviors and that all worked well.
Recently I have moved to using my wordpress instance as an api host. I have a Vue build on s3 for my frontend content. All of this behind cloudfront.
So now, my default behavior must point to s3 instead of the wordpress instance. I'm having issues navigating pages now and I'm not sure why.
For instance while in the wordpress control panel if I click a link the default behavior is hit instead of wp-admin/. If I refresh after the default behavior is still hit. However, if I hard refresh (ctrl-shift-r) the desired wp-admin/ behavior is hit.
This also occurs with wp-json/*
I'm rather puzzled about why this is even happening so any input would help.
Adding an example. I navigate to: /wp-admin/edit.php?post_type=page Cloudfront routes to the default behavior of * which is s3. I hit ctrl-shift-r and /wp-admin/edit.php?post_type=page is loaded on my /wp-admin/* behavior.
I don't understand why or how to fix it.
I am building a PWA Vue site. I'll detail and mark my solution later.
For now, what this means is after the server worker is installed for the domain by viewing the front end it will disrupt the admin panel from being accessed. It hijacks the request before it even hits cloudfront, I assume.