Finally fixed CORS preflight requests