Fixes CORS configuration bug
Add method for preflight requests