Hi everyone,
Im currently building a small web app (dockerized, frontend served statically + backend bundled together) that is only accessible by a specific group managed by Entra ID. This is done via the provided Authentication inside the App Service.
Thus far everything works fine.
Now i want to add a Custom Domain to my App Service.
I added these to its section and also added the A Record and TXT Record to the domain provider (Changes are already applied to all DNS). This also still works. When i enter the custom domain or the default domain i get redirected to the login mask and can only access the site when im authenticated.
Here comes my problem:
When sending a request from my custom domain to my backend i get a CORS Error.
However when i send it directly from my default domain i have no issues.
Now im not sure where the problem is coming from, since i didnt really change much except the custom domain. Ive set up the redirect urls in the app registration and the authentication section of the app service. The storage in my browser shows an AppServiceAuthSession Cookie. And i double checked the Authentification Process (when logging in with a user without the necessary group, i cannot access the website).
Whats different is the request i can see on the network tab. Somehow it doesnt contain the cookie..
Do i have to manually set the cookies when i use custom domains? Currently my function is super simple and looks like this..
async function search(query: string): Promise