Skip to content

Commit

Permalink
fix: Use FirstOrDefault in OriginValidationFilter (#1570)
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnRG authored Aug 1, 2023
1 parent ced7a0b commit 035bafb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion VocaDbWeb/Helpers/OriginValidationFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class OriginValidationFilter : IActionFilter
{
public void OnActionExecuting(ActionExecutingContext context)
{
var requestOrigin = context.HttpContext.Request.Headers["Origin"].First();
var requestOrigin = context.HttpContext.Request.Headers["Origin"].FirstOrDefault();
// TODO: Make this list configurable
var allowedOrigins = new[] { "https://vocadb.net", "https://touhoudb.com", "https://utaitedb.net", "http://localhost:56401", "https://vocadb.vercel.app", "https://beta.vocadb.net", "http://localhost:5173" };

Expand Down

0 comments on commit 035bafb

Please sign in to comment.