You can use owin middleware to define cors policy in which you can define multiple cors origins
return new CorsOptions
{
PolicyProvider = new CorsPolicyProvider
{
PolicyResolver = context =>
{
var policy = new CorsPolicy()
{
AllowAnyOrigin = false,
AllowAnyMethod = true,
AllowAnyHeader = true,
SupportsCredentials = true
};
policy.Origins.Add("http://foo.com");
policy.Origins.Add("http://bar.com");
return Task.FromResult(policy);
}
}
};