Auth fixes

This commit is contained in:
olcxja 2026-04-30 14:36:33 +02:00
commit 7ca4b5ceb3
3 changed files with 34 additions and 11 deletions

View file

@ -44,6 +44,18 @@ public class Program
IQueryCollection query = context.Request.Query;
using StreamReader reader = new StreamReader(context.Request.Body);
//custom header moment
context.Response.Headers["Access-Control-Allow-Origin"] = "*";
context.Response.Headers["Access-Control-Allow-Headers"] = "*";
context.Response.Headers["Access-Control-Allow-Methods"] = "*";
if (context.Request.Method.ToUpper() == "OPTIONS")
{
context.Response.StatusCode = 200;
await context.Response.CompleteAsync();
return;
}
switch (path)
{
case "/_larpix/serverinfo":