A failed preflight request returns 400 or 404 with none error message. It is hard to debug from client. CORS Spec does not define what we can put in error preflight response's body [1].
Consider add HttpError message to preflight response. Through which user can control the level of information intent to expose.
[1] http://www.w3.org/TR/cors/#resource-preflight-requests
Comments: Yes, It just stuck at last line, & there is nothing to execute, request just timeout, ``` protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { CorsRequestContext corsRequestContext = request.GetCorsRequestContext(); if (corsRequestContext != null) { try { if (corsRequestContext.get_IsPreflight()) { return await this.HandleCorsPreflightRequestAsync(request, corsRequestContext, cancellationToken); } return await this.HandleCorsRequestAsync(request, corsRequestContext, cancellationToken); } catch (Exception exception) { return HandleException(request, exception); } } return await base.SendAsync(request, cancellationToken); } ```
Consider add HttpError message to preflight response. Through which user can control the level of information intent to expose.
[1] http://www.w3.org/TR/cors/#resource-preflight-requests
Comments: Yes, It just stuck at last line, & there is nothing to execute, request just timeout, ``` protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { CorsRequestContext corsRequestContext = request.GetCorsRequestContext(); if (corsRequestContext != null) { try { if (corsRequestContext.get_IsPreflight()) { return await this.HandleCorsPreflightRequestAsync(request, corsRequestContext, cancellationToken); } return await this.HandleCorsRequestAsync(request, corsRequestContext, cancellationToken); } catch (Exception exception) { return HandleException(request, exception); } } return await base.SendAsync(request, cancellationToken); } ```