Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

CORS filter should throw when policy is not found #4606

Closed
rynowak opened this issue May 10, 2016 · 1 comment
Closed

CORS filter should throw when policy is not found #4606

rynowak opened this issue May 10, 2016 · 1 comment
Assignees
Labels
3 - Done bug up-for-grabs Members of our awesome commnity can handle this issue
Milestone

Comments

@rynowak
Copy link
Member

rynowak commented May 10, 2016

Use [EnableCors("foo")] without defining any policies.

System.ArgumentNullException: Value cannot be null.
Parameter name: policy
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsService.EvaluatePolicy(HttpContext context, CorsPolicy policy)
   at Microsoft.AspNetCore.Mvc.Cors.CorsAuthorizationFilter.<OnAuthorizationAsync>d__9.MoveNext()

We just let it nullref, we should throw a better exception.

@Eilon Eilon added this to the 1.0.0 milestone May 10, 2016
@Eilon Eilon added bug 1 - Ready up-for-grabs Members of our awesome commnity can handle this issue labels May 10, 2016
@pranavkm
Copy link
Contributor

Fixed in 0f8542e

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3 - Done bug up-for-grabs Members of our awesome commnity can handle this issue
Projects
None yet
Development

No branches or pull requests

3 participants