<?php
use think\facade\Route;


Route::group(function () {
    Route::rule(':version/user/:action', 'api/:version.user/:action');
})->middleware(\app\api\middleware\CheckParams::class);

Route::group(function(){
    Route::rule(':version/:controller/:action','api/:version.:controller/:action');
})->allowCrossDomain([
    'Access-Control-Allow-Headers' => 'Origin, X-Requested-With, Content-Type, Accept, Authorization, SessionId, sessionid',
    'Access-Control-Expose-Headers' => 'Authorization, SessionId, sessionid'
]);