Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

Commented Issue: [CORS] Preflight request failed when there's an HttpOptions route attribute [1050]

$
0
0
This is reported by a customer. See more details here: https://aspnetwebstack.codeplex.com/discussions/441725#editor
Repro attached.
Comments: Hi Yao, Just installed today's build. I'm only successful if I keep the HttpOptions attribute on the method. ``` [HttpGet("{id}/feed")] [HttpOptions("{id}/feed")] [EnableCors("*", "*", "*", SupportsCredentials = true)] public async Task<HttpResponseMessage> GetFeed(string id) ``` Shouldn't I be able to remove the HttpOptions attribute and have CORS handle the preflight OPTIONS on its own? Thanks, Bruno

Viewing all articles
Browse latest Browse all 7925

Trending Articles



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