fix: finish prospect workflow safeguards
CI and Deploy / test (push) Successful in 2m37s
CI and Deploy / deploy (push) Successful in 54s

This commit is contained in:
cesnimda
2026-07-30 23:34:42 +02:00
parent 792814b04e
commit efc9d83c25
3 changed files with 13 additions and 20 deletions
+6 -13
View File
@@ -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();
});
});