Skip to content

Commit

Permalink
feat: added base cors header
Browse files Browse the repository at this point in the history
  • Loading branch information
Iam1337 committed Dec 9, 2024
1 parent c9063a2 commit 7607917
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Assets/extApi/Runtime/Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ private void ListenProcess()
var context = _listener.GetContext();
var contextMethod = new HttpMethod(context.Request.HttpMethod);


context.Response.AddHeader("Access-Control-Allow-Origin", "*");

var routeUri = context.Request.Url;
var routeParameters = new Dictionary<string, string>();
var target = GetRouteTarget(contextMethod, routeUri.Segments, routeParameters);
Expand Down

0 comments on commit 7607917

Please sign in to comment.