Auth fixes
This commit is contained in:
parent
c58d3dbcdf
commit
7ca4b5ceb3
3 changed files with 34 additions and 11 deletions
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue