Revert "Revert "Revert "fix cors issue for cloudfront"""

This reverts commit 24873a9a391dac9c258aa8553590817bfa85b070.