0

I have Angular app deployed in two container apps with custom domain as below

app1.dev.myproduct.mydomain.com  
app2.dev.myproduct.mydomain.com

Here app1 is the shell container and it calls app2 using Module Federation. Even though they are in the same domain *.mydomain.com there is CORS issue.

I managed to workaround by adding CORS Allowed Origin as app1.dev.myproduct.mydomain.com in to app2 and also Allowed Headers "Access-Control-Allow-Origin"

But, how can I avoid this CORS without adding Allowed Origin?
Is it necessary to add Allowed Origin even if both the custom domain for the container app is in same base domain?

Kiru
  • 3,489
  • 1
  • 25
  • 46
  • 3
    Different subdomains imply different Web origins, hence your need for configuring CORS. See examples on https://developer.mozilla.org/en-US/docs/Glossary/Origin – jub0bs Jun 06 '23 at 08:53

0 Answers0