I am using cors how to enable vary by origin for options in asp.net? so the options will have vary:origin header. Here is the code I am using
services.AddCors(options =>
{
options.AddPolicy(Origins,
builder =>
{
builder.SetIsOriginAllowed(origin => ListOfOrigin(origin))
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials()
.SetPreflightMaxAge(TimeSpan.FromMinutes(1));
});
});