WebApiStartTemplate icon indicating copy to clipboard operation
WebApiStartTemplate copied to clipboard

corsPolicy not adding origins

Open randallto opened this issue 8 years ago • 1 comments

Great template! Thanks. I had to make this one change to use cors origins in CorConfig.cs This was not adding the origins list: corsPolicy.Origins.ToList().AddRange(origins.Split(';'));

Ended up replacing it with: foreach(var item in origins.Split(';')) { corsPolicy.Origins.Add(item); }

randallto avatar Apr 25 '18 20:04 randallto

Hi,

Thanks and thanks for the feedback. I see how this might not work because of the ToList() call.

I will look into it.

MirzaMerdovic avatar Apr 25 '18 20:04 MirzaMerdovic