Revert "Revert "fix cors issue for cloudfront""

This reverts commit 8590c79d6ef99bb26a8506e5742eb30d6544cc24.

Conflicts:
	Gemfile