From 28f21bae122bd7b8f4c1cc8a9b0ca7ef41ad7fcf Mon Sep 17 00:00:00 2001 From: Toastie <toastie@toastiet0ast.com> Date: Sat, 29 Mar 2025 20:53:46 +1300 Subject: [PATCH] allow origins in votes --- src/EllieBot.VotesApi/Startup.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/EllieBot.VotesApi/Startup.cs b/src/EllieBot.VotesApi/Startup.cs index 7cdd1aa..c8c1f49 100644 --- a/src/EllieBot.VotesApi/Startup.cs +++ b/src/EllieBot.VotesApi/Startup.cs @@ -53,6 +53,11 @@ namespace EllieBot.VotesApi opts.AddPolicy(Policies.DiscordbotlistAuth, static policy => policy.RequireClaim(AuthHandler.DiscordbotlistClaim)); }); + + services.AddCors(x => x.AddDefaultPolicy(cpb => + cpb.AllowAnyHeader() + .AllowAnyMethod() + .AllowAnyOrigin())); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.