Fixes warnings for the cors preflight view
Set cors headers when an response is returned or exception is raised
Merge branch 'fix-options-warnings'