Fix for CORS redirects