diff --git a/CorsClient/CorsClient/wwwroot/Index.html b/CorsClient/CorsClient/wwwroot/Index.html index 4c69ef0..d9748c9 100644 --- a/CorsClient/CorsClient/wwwroot/Index.html +++ b/CorsClient/CorsClient/wwwroot/Index.html @@ -50,7 +50,7 @@
diff --git a/CorsServer/CorsServer.WebApi31/Controllers/CorsController.cs b/CorsServer/CorsServer.WebApi31/Controllers/CorsController.cs index 30aeffd..ed56c88 100644 --- a/CorsServer/CorsServer.WebApi31/Controllers/CorsController.cs +++ b/CorsServer/CorsServer.WebApi31/Controllers/CorsController.cs @@ -18,6 +18,11 @@ namespace CorsServer.WebApi31.Controllers } [HttpGet] + [HttpPut] + [HttpHead] + [HttpPost] + [HttpDelete] + [HttpPatch] [HttpOptions] public IActionResult Ping() { @@ -27,6 +32,11 @@ namespace CorsServer.WebApi31.Controllers } [HttpGet] + [HttpPut] + [HttpHead] + [HttpPost] + [HttpDelete] + [HttpPatch] [HttpOptions] [EnableCors(CorsPolicyNameConst.DefaultPolicyName)] public IActionResult HasCors() @@ -36,7 +46,13 @@ namespace CorsServer.WebApi31.Controllers return Ok(data); } + [HttpGet] + [HttpPut] + [HttpHead] + [HttpPost] + [HttpDelete] + [HttpPatch] [HttpOptions] [DisableCors] public IActionResult NoCors() diff --git a/CorsServer/CorsServer.WebApi31/Controllers/TestController.cs b/CorsServer/CorsServer.WebApi31/Controllers/TestController.cs index 40c8a06..9d355e7 100644 --- a/CorsServer/CorsServer.WebApi31/Controllers/TestController.cs +++ b/CorsServer/CorsServer.WebApi31/Controllers/TestController.cs @@ -19,6 +19,12 @@ namespace CorsServer.WebApi31.Controllers } [HttpGet] + [HttpPut] + [HttpHead] + [HttpPost] + [HttpDelete] + [HttpPatch] + [HttpOptions] public IActionResult Ping() { var data = new { Code=0,Message="Ok" };