Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Commented Issue: [CORS] Consider attaching error message in failed preflight request. [1182]

$
0
0
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); } ```

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>