PATCH http://192.168.2.42/admin/brand/batch 404 (Not Found)
/#/brand/manage:1 Access to fetch at 'http://192.168.2.42/admin/brand/batch' from origin 'http://appcontent.d88.ink' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.如上,爆出了跨域的问题在index.php中 ,我设置了相关的东西
// 准许跨域请求。
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: ,POST, OPTIONS,GET,PUT,PATCH,DELETE");
header('Access-Control-Allow-Credentials: true');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, authKey, sessionId");可以依旧得不到解决啊get \ post 请求能正常请求
后来我改用这种办法,
Route::rule('browsing/all','index/Browsing/deleteAll','delete|options');就能正常的访问delete 方法可是,又有部分接口就是如上还是出现那样的问题,不知道该如何解决了,
尝试过使用behavior,无用
最佳答案