Commit 309aee00 by gongyang

提交代码

parent f7d5ebe1
Showing with 13 additions and 0 deletions
...@@ -33,6 +33,19 @@ class NoticeController extends Controller ...@@ -33,6 +33,19 @@ class NoticeController extends Controller
public function businessNoticeList(Request $request) public function businessNoticeList(Request $request)
{ {
$origin = isset($_SERVER['HTTP_ORIGIN'])? $_SERVER['HTTP_ORIGIN'] : '';
$origin_arr = explode('//', $origin);
$allow_origin = ['order2.xiaokang.liexinlocal.com'];
if(in_array($origin_arr['1'], $allow_origin)){
header('Access-Control-Allow-Origin:'.$origin);
header('Access-Control-Allow-Credentials:true');
header('Access-Control-Allow-Methods:POST');
// header('Access-Control-Allow-Headers:x-requested-with,content-type');
header('Access-Control-Allow-Headers:x-requested-with,content-type,hunt_types');
}
header("Content-type: text/html; charset=utf-8");
$data = $request->all(); $data = $request->all();
try{ try{
$data['show_status'] = 1; $data['show_status'] = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment