mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-10-27 02:51:17 +00:00
Update WelsonJS.Toolkit/WelsonJS.Launcher/ResourceServer.cs
Co-authored-by: qodo-merge-pro[bot] <151058649+qodo-merge-pro[bot]@users.noreply.github.com>
This commit is contained in:
parent
b9e39dd9c7
commit
a745b6d0a7
|
|
@ -545,12 +545,8 @@ namespace WelsonJS.Launcher
|
|||
var requestMethod = context.Request.Headers["Access-Control-Request-Method"];
|
||||
|
||||
var h = context.Response.Headers;
|
||||
h["Access-Control-Allow-Methods"] = string.IsNullOrEmpty(requestMethod)
|
||||
? "GET, POST, PUT, DELETE, OPTIONS"
|
||||
: requestMethod;
|
||||
h["Access-Control-Allow-Headers"] = string.IsNullOrEmpty(requestHeaders)
|
||||
? "Content-Type, Authorization, X-Requested-With"
|
||||
: requestHeaders;
|
||||
h["Access-Control-Allow-Methods"] = "GET, POST, PUT, DELETE, OPTIONS";
|
||||
h["Access-Control-Allow-Headers"] = "Content-Type, Authorization, X-Requested-With";
|
||||
h["Access-Control-Max-Age"] = "600";
|
||||
|
||||
context.Response.StatusCode = 204;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user