fix: finish prospect workflow safeguards
This commit is contained in:
@@ -105,19 +105,12 @@ builder.Services.AddCors(options =>
|
||||
}
|
||||
|
||||
if (origins.Any(x => x.Trim() == "*"))
|
||||
{
|
||||
policy.SetIsOriginAllowed(_ => true)
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.AllowCredentials();
|
||||
}
|
||||
else
|
||||
{
|
||||
policy.WithOrigins(origins.Select(x => x.Trim()).Where(x => x.Length > 0).ToArray())
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.AllowCredentials();
|
||||
}
|
||||
throw new InvalidOperationException("Cors:Origins cannot contain wildcard when credentialed requests are enabled.");
|
||||
|
||||
policy.WithOrigins(origins.Select(x => x.Trim()).Where(x => x.Length > 0).ToArray())
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.AllowCredentials();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user