This is another very important Sitecore API expose blog. Very simply, we can resolve the CORS issue. To do that, we have to do the below.
- Add a custom attribute called “AllowCrossSite” like the below code. I have added “ * ” in “Access-Control-Allow-Origin”. We can define the URL like abc.com.
- Simply add this attribute in our controller like –
- Deploy and build.