I've been trying to setup Front Door (standard) endpoint to route two azure storage static websites. But thats is not working as expected.I need both static apps under same domain name but different path of URL like this.
www.something.com -> static app 1
www.something.com/client -> static app 2
The pattern to match I have added for the static app 1 is --> /* and the origin path is --> /. Same way I have added the pattern to match for the static app 2 is --> /client/* and the origin path is --> /
The first app is working as expected. But the second app route is not working as expected and I am getting 400 error.
Both of the static apps created using nextjs and exported as a staticapp. For each apps I have created separate origin groups and pointed to route rules. I am not sure what configuration I am missing here. Can someone help me on this?
I have fixed this issue by adding basepath in our nextjs application. So then that will load the scripts from that path.
const nextConfig = {
basePath:'/client'
};
Then the scrips specified in the index.html will load as below
<link
rel="preload"
href="/client/_next/static/css/5650791e71b69c72.css"
as="style"
/>
I hope this will help someone.