Because of how Clerk authentication works, we need www.clientcustomdomain.com/admin to automatically redirect to clientslug.performant.studio/admin before it tries to do any auth stuff, otherwise Clerk will complain about it. And then on the flip side we presumably want clientslug.performant.studio/* to redirect to the custom domain for any value of * that doesn't start with /admin.
Possibly there's useful information here about how to use Netlify to accomplish this (might need to be written into a _redirects file as part of the build process?), or maybe we can use the Astro config file (but similarly the actual URLs might need to be written into the file before astro build is run). Or maybe there's some easier way to accomplish this that I'm just not thinking of.
Because of how Clerk authentication works, we need
www.clientcustomdomain.com/adminto automatically redirect toclientslug.performant.studio/adminbefore it tries to do any auth stuff, otherwise Clerk will complain about it. And then on the flip side we presumably wantclientslug.performant.studio/*to redirect to the custom domain for any value of*that doesn't start with/admin.Possibly there's useful information here about how to use Netlify to accomplish this (might need to be written into a
_redirectsfile as part of the build process?), or maybe we can use the Astro config file (but similarly the actual URLs might need to be written into the file beforeastro buildis run). Or maybe there's some easier way to accomplish this that I'm just not thinking of.