Followup to https://github.com/Sitecore/jss/pull/1798
EnforceCors function should also check the previously set CORS headers if present, as editing middleware will be requested from sitecoreApiHost too.
Testing Details
[x] Unit Test Added
[ ] Manual Test/Other (Please elaborate)
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description / Motivation
Followup to https://github.com/Sitecore/jss/pull/1798 EnforceCors function should also check the previously set CORS headers if present, as editing middleware will be requested from sitecoreApiHost too.
Testing Details
Types of changes