How to resolve CORS Issue in local
Unanswered
Gharial posted this in #help-forum
GharialOP
I needed some guidance on resolving cors issue when running nextjs apps (mfe1 and mfe2) in local using module federation. Mfe1 loads a component from mfe2 which then makes an api call to mfe2 but fails due to cors issue. I know it can be resolved by using chrome extension or adding "cors" package that will require changes to code but is there any better way through which it can be resolved?
Note that right now mfe1 only communicates with mfe2 but in future there can be more so would ideally want to implement it in a way that would just be a one time setup and doesn't require adding in some JS code in each mfe.
Note that right now mfe1 only communicates with mfe2 but in future there can be more so would ideally want to implement it in a way that would just be a one time setup and doesn't require adding in some JS code in each mfe.