29 lines
1.2 KiB
PHP
29 lines
1.2 KiB
PHP
|
<?php
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | Author: CRMEB Team <admin@crmeb.com>
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
|
|||
|
use app\api\middleware\BlockerMiddleware;
|
|||
|
use think\facade\Route;
|
|||
|
use think\facade\Config;
|
|||
|
use think\Response;
|
|||
|
|
|||
|
Route::group(function () {
|
|||
|
Route::get('index/index', 'v1.index.IndexController/index')->option(['real_name' => '移动端首页']);//移动端首页
|
|||
|
})->option(['mark' => 'index', 'mark_name' => '移动端接口']);
|
|||
|
|
|||
|
Route::miss(function () {
|
|||
|
if (app()->request->isOptions()) {
|
|||
|
$header = Config::get('cookie.header');
|
|||
|
unset($header['Access-Control-Allow-Credentials']);
|
|||
|
return Response::create('ok')->code(200)->header($header);
|
|||
|
} else
|
|||
|
return Response::create()->code(404);
|
|||
|
});
|