This has now been implemented in version 2.0.0. In your ConfigureServices
use the following:
options.AddPolicy("MyCorsPolicy",
builder => builder
.SetIsOriginAllowedToAllowWildcardSubdomains()
.WithOrigins("https://*.mydomain.com")
.AllowAnyMethod()
.AllowCredentials()
.AllowAnyHeader()
.Build()
);
Also, don’t forget to call UseCors in your Configure
call too:
app.UseCors("MyCorsPolicy");