From ea42277be705c202aeb10f15c482e7d9bc93a091 Mon Sep 17 00:00:00 2001 From: "xiaobo.sun" <5ini99@sohu.com> Date: Fri, 26 Feb 2016 10:21:40 +0800 Subject: [PATCH] Update Route.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增路由模块中支持'OPTIONS'类型,该类型为跨域请求api时,ajax自动发送OPTIONS类型的请求报500错误问题 --- library/think/Route.php | 1 + 1 file changed, 1 insertion(+) diff --git a/library/think/Route.php b/library/think/Route.php index 01e3272c..6af2aec4 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -20,6 +20,7 @@ class Route 'PUT' => [], 'DELETE' => [], 'HEAD' => [], + 'OPTIONS'=> [], '*' => [], ];